71 lines
1.4 KiB
VimL
71 lines
1.4 KiB
VimL
" vim: set tw=80 :
|
|
|
|
" SETTINGS
|
|
|
|
if !has('nvim')
|
|
setlocal cm=blowfish2
|
|
end
|
|
|
|
" set relative line numbers
|
|
set number relativenumber
|
|
|
|
" set highlighting and continous search
|
|
set hlsearch incsearch
|
|
|
|
" show n-column limiter when textwidth is set
|
|
set colorcolumn=+1
|
|
|
|
if has('nvim')
|
|
" prevent terminal buffers to be closed when changing buffer
|
|
autocmd TermOpen * set bufhidden=hide
|
|
|
|
" remove line numbers to terminale
|
|
autocmd TermOpen * set nornu nonu
|
|
end
|
|
|
|
" set autoindent on`
|
|
set autoindent
|
|
|
|
" Make :find work on all files in :pwd
|
|
set path+=**
|
|
set wildignore+=**/node_modules/**
|
|
|
|
" ADDITIONAL COMMANDS
|
|
|
|
" make escape work in terminal and send ESC to terminal with C-Esc
|
|
tnoremap <Esc> <C-\><C-n>
|
|
tnoremap <C-Esc> <Esc>
|
|
|
|
" clear search with F2
|
|
nnoremap <F2> noh
|
|
|
|
" clear trailing spaces with F3
|
|
nnoremap <F3> :%s/\s *$//g<CR>
|
|
|
|
" show Vim's true competitor with F4
|
|
nnoremap <F4> :!open https://youtu.be/jn40Ugz0vuk<CR><CR>
|
|
|
|
" COLORSCHEME
|
|
|
|
" set colorscheme to onedark.vim for nvim and airline
|
|
packadd! onedark.vim
|
|
colorscheme onedark
|
|
let g:airline_theme='onedark'
|
|
|
|
" PACKAGES
|
|
|
|
" vim-fish setup
|
|
syntax enable
|
|
filetype plugin indent on
|
|
" Set up :make to use fish for syntax checking.
|
|
autocmd FileType fish compiler fish
|
|
|
|
if has("vms")
|
|
set nobackup " do not keep a backup file, use versions instead
|
|
else
|
|
set backup " keep a backup file (restore to previous version)
|
|
if has('persistent_undo')
|
|
set undofile " keep an undo file (undo changes after closing)
|
|
endif
|
|
endif
|
|
|