46 lines
1.2 KiB
VimL
46 lines
1.2 KiB
VimL
" set relative line numbers
|
|
set number relativenumber
|
|
" set highlighting and continous search
|
|
set hlsearch incsearch
|
|
" clear search with F2
|
|
nnoremap <F2> noh
|
|
" show n-column limiter when textwidth is set
|
|
set colorcolumn=+1
|
|
" prevent terminal buffers to be closed when changing buffer
|
|
autocmd TermOpen * set bufhidden=hide
|
|
" make escape work in terminal and send ESC to terminal with C-Esc
|
|
tnoremap <Esc> <C-\><C-n>
|
|
tnoremap <C-Esc> <Esc>
|
|
|
|
" VIM-FISH
|
|
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
|
|
|
|
" Only do this part when compiled with support for autocommands.
|
|
if has("autocmd")
|
|
|
|
" Put these in an autocmd group, so that we can delete them easily.
|
|
augroup vimrcEx
|
|
au!
|
|
|
|
" For all text files set 'textwidth' to 78 characters.
|
|
autocmd FileType text setlocal textwidth=78
|
|
|
|
augroup END
|
|
|
|
else
|
|
|
|
set autoindent " always set autoindenting on
|
|
|
|
endif " has("autocmd")
|