add linux vps conf
This commit is contained in:
131
linux/deb11-vps/.vimrc
Normal file
131
linux/deb11-vps/.vimrc
Normal file
@@ -0,0 +1,131 @@
|
||||
syntax enable " Turn on syntax highlighting
|
||||
set hidden " Leave hidden buffers open
|
||||
set history=100 "by default Vim saves your last 8 commands. We can handle more
|
||||
|
||||
" Enable filetype plugins
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
"Always show current position
|
||||
set ruler
|
||||
|
||||
" Height of the command bar
|
||||
set cmdheight=1
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => Status line
|
||||
""""""""""""""""""""""""""""""
|
||||
" Always show the status line
|
||||
set laststatus=2
|
||||
|
||||
" Format the status line
|
||||
" set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
|
||||
set statusline=%t "tail of the filename
|
||||
set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
|
||||
set statusline+=%{&ff}] "file format
|
||||
set statusline+=%h "help file flag
|
||||
set statusline+=%m "modified flag
|
||||
set statusline+=%r "read only flag
|
||||
set statusline+=%y "filetype
|
||||
set statusline+=%= "left/right separator
|
||||
set statusline+=%c, "cursor column
|
||||
set statusline+=%l/%L "cursor line/total lines
|
||||
set statusline+=\ %P "percent through file
|
||||
|
||||
" https://stackoverflow.com/a/10416234
|
||||
set statusline=
|
||||
set statusline+=%7*\[%n] "buffernr
|
||||
set statusline+=%1*\ %<%F\ "File+path
|
||||
set statusline+=%2*\ %y\ "FileType
|
||||
set statusline+=%3*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
|
||||
set statusline+=%3*\ %{(&bomb?\",BOM\":\"\")}\ "Encoding2
|
||||
set statusline+=%4*\ %{&ff}\ "FileFormat (dos/unix..)
|
||||
set statusline+=%5*\ %{&spelllang}\%{HighlightSearch()}\ "Spellanguage & Highlight on?
|
||||
set statusline+=%8*\ %=\ row:%l/%L\ (%03p%%)\ "Rownumber/total (%)
|
||||
set statusline+=%9*\ col:%03c\ "Colnr
|
||||
set statusline+=%0*\ \ %m%r%w\ %P\ \ "Modified? Readonly? Top/bot.
|
||||
|
||||
hi User1 ctermfg=15 ctermbg=88 guifg=#ffdad8 guibg=#880c0e "File+path
|
||||
hi User2 ctermfg=0 ctermbg=173 guifg=#000000 guibg=#F4905C "FileType
|
||||
hi User3 ctermfg=0 ctermbg=186 guifg=#292b00 guibg=#f4f597 "Encoding
|
||||
hi User4 ctermfg=0 ctermbg=150 guifg=#112605 guibg=#aefe7B "FileFormat (dos/unix..)
|
||||
hi User5 ctermfg=0 ctermbg=114 guifg=#051d00 guibg=#7dcc7d "Spellanguage & Highlight on?
|
||||
hi User7 ctermfg=15 ctermbg=88 guifg=#ffffff guibg=#880c0e gui=bold cterm=bold "buffernr
|
||||
hi User8 ctermfg=15 ctermbg=62 guifg=#ffffff guibg=#5b7fbb "Rownumber/total (%)
|
||||
hi User9 ctermfg=15 ctermbg=90 guifg=#ffffff guibg=#810085 "Colnr
|
||||
hi User0 ctermfg=7 ctermbg=8 guifg=#ffffff guibg=#094afe "Modified? Readonly? Top/bot.
|
||||
hi StatusLine ctermfg=237 ctermbg=255
|
||||
|
||||
function! HighlightSearch()
|
||||
if &hls
|
||||
return 'H'
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Configure backspace so it acts as it should act
|
||||
set backspace=eol,start,indent
|
||||
set whichwrap+=<,>,h,l
|
||||
|
||||
" Ignore case when searching
|
||||
set ignorecase
|
||||
|
||||
" When searching try to be smart about cases
|
||||
set smartcase
|
||||
|
||||
" Highlight search results
|
||||
set hlsearch
|
||||
|
||||
" Makes search act like search in modern browsers
|
||||
set incsearch
|
||||
|
||||
" Don't redraw while executing macros (good performance config)
|
||||
set lazyredraw
|
||||
" For regular expressions turn magic on
|
||||
set magic
|
||||
|
||||
" Show matching brackets when text indicator is over them
|
||||
set showmatch
|
||||
" How many tenths of a second to blink when matching brackets
|
||||
set mat=2
|
||||
|
||||
" No annoying sound on errors
|
||||
set noerrorbells
|
||||
set novisualbell
|
||||
set t_vb=
|
||||
set tm=500
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Text, tab and indent related
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Use spaces instead of tabs
|
||||
set expandtab
|
||||
|
||||
" Be smart when using tabs ;)
|
||||
set smarttab
|
||||
|
||||
" 1 tab == 2 spaces
|
||||
set shiftwidth=2
|
||||
set tabstop=2
|
||||
|
||||
" Linebreak on 500 characters
|
||||
set lbr
|
||||
set tw=500
|
||||
|
||||
set ai "Auto indent
|
||||
set si "Smart indent
|
||||
set wrap "Wrap lines
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Helper functions
|
||||
" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" " Returns true if paste mode is enabled
|
||||
|
||||
function! HasPaste()
|
||||
if &paste
|
||||
return 'PASTE MODE '
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user