From f58b2324ad04df4f905b88aa92a9d6ad5a71431e Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 11 Mar 2025 22:57:10 +0100 Subject: [PATCH] addet some config --- .vimrc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 7f1d104..607ef34 100644 --- a/.vimrc +++ b/.vimrc @@ -19,7 +19,7 @@ set hidden " allows to change bufferfs even if there are unsaved changes set laststatus=2 " last window always has a statusline set nohlsearch " Don't continue to highlight searched phrases. set incsearch " But do highlight as you type your search. -set ruler " Always show info along bottom. +"set ruler " Always show info along bottom. set autoindent set previewheight=30 set textwidth=80 " text width to hard-fold (gq) @@ -34,7 +34,7 @@ set lazyredraw " Don't redraw the screen when executing macros etc. set splitright set splitbelow set autoread " Re-read file if it has been edited outside vim and not inside -set scrolloff=6 " Keep at least 1 line visible at top/bottom when scrolling +set scrolloff=6 " Keep at least 6 line visible at top/bottom when scrolling if &listchars ==# 'eol:$' set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+ endif @@ -81,3 +81,20 @@ nnoremap lf :Lexplore nnoremap :ls:b iabbrev + + +"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. +"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support +"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.) +if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal') + if (has("nvim")) + "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > + let $NVIM_TUI_ENABLE_TRUE_COLOR=1 + endif + "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > + "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > + " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > + if (has("termguicolors")) + set termguicolors + endif +endif