User Tools

Site Tools


en:linux:scripts:vimrc

/home/<username>/.vimrc

Vim config.

" runtime path (to give overrule settings the heighest weight)
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/usr/share/lilypond/2.12.3/vim,$HOME/.vim/overrule

" I want to use filetype plugins
filetype plugin indent on

" always have syntax highlighting and spell off
syntax on
set nospell

" set default look
set number
set ts=4
set incsearch

" always show tab line
set showtabline=2

" when you press tab with an incoplete commad, it will show all possibilities
set wildmenu

" do not wrap lines
set nowrap

" enable reading settings from files
set modeline

" maximum number of tabs
set tabpagemax=20

" do not save *~ files
set nobackup

" switchin search higlight on and off
map <F5> :set hls!<bar>set hls?<CR>
imap <F5> <ESC>:set hls!<bar>set hls?<CR>a

" set up and down moving behaviour
imap <Up> <ESC>g<Up>a
imap <Down> <ESC>g<Down>a
map <Up> g<Up>
map <Down> g<Down>

" backspace bahaviour
set backspace=indent,eol,start
map <BACKSPACE> i<BACKSPACE><RIGHT><ESC>

" tab moves
map <A-Right> gt
map <A-Left>  gT
imap <A-Right> <ESC>gti
imap <A-Left>  <ESC>gTi

" tab open and close
"map <C-O> :tabe<space>
"imap <C-O> <esc>:tabe<space>
"map <C-W> :tabc<enter>
"imap <C-W> <ESC>:tabc<enter>

" open in tab before
com! -narg=1 -complete=file Tabe :exe (tabpagenr() - 1) . "tabedit " . <q-args>

command! Fn :!echo %:p
en/linux/scripts/vimrc.txt · Last modified: 2010/09/01 11:00 (external edit)