software:vimrc
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | software:vimrc [2024/08/14 13:52] (current) – solar | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== ~/.vimrc ====== | ||
+ | My '' | ||
+ | |||
+ | < | ||
+ | filetype on " | ||
+ | filetype plugin indent on " | ||
+ | set expandtab | ||
+ | autocmd FileType make set noexpandtab | ||
+ | autocmd FileType cpp set keywordprg=cppman | ||
+ | autocmd BufWritePost *.c, | ||
+ | |||
+ | " If some system gives you problems with encodings and you suspect a | ||
+ | " broken Vim setup, try uncommenting this. | ||
+ | "set encoding=utf-8 | ||
+ | |||
+ | set shiftwidth=4 | ||
+ | set tabstop=4 | ||
+ | set ruler " | ||
+ | set laststatus=2 | ||
+ | "set statusline=%F%m%r%h%w\ [FORMAT=%{& | ||
+ | set statusline=%F%m%r%h%w\ %=[%{& | ||
+ | set listchars=tab:> | ||
+ | set list " Display whitespaces | ||
+ | syntax on " | ||
+ | color koehler | ||
+ | set background=dark | ||
+ | set wrap " Wrap long lines | ||
+ | set showmatch | ||
+ | set vb t_vb= " Disable terminal beeps | ||
+ | set incsearch | ||
+ | set scrolloff=3 | ||
+ | "set spell " Spellchecker on (]s - next word, zg - add good, zug - undo add, z= - suggest, | ||
+ | " : | ||
+ | setlocal spelllang=de | ||
+ | set mouse=a | ||
+ | set pastetoggle=< | ||
+ | |||
+ | set tags=./ | ||
+ | |||
+ | highlight ColorColumn ctermbg=magenta | ||
+ | call matchadd( ' | ||
+ | |||
+ | set hlsearch | ||
+ | |||
+ | " ' | ||
+ | " do some trickery to highlight that one in a special way (flashing for | ||
+ | " 0.4 seconds). | ||
+ | |||
+ | " function to flash the current match a number of times | ||
+ | function! HLNext (blink) | ||
+ | let [bufnum, lnum, col, off] = getpos(' | ||
+ | let matchlen = strlen(matchstr(strpart(getline(' | ||
+ | let target_pat = ' | ||
+ | let i = 1 | ||
+ | while i < a:blink | ||
+ | exec 'sleep 50m' | ||
+ | let ring = matchadd(' | ||
+ | redraw | ||
+ | exec 'sleep 50m' | ||
+ | call matchdelete(ring) | ||
+ | redraw | ||
+ | let i += 1 | ||
+ | endwhile | ||
+ | endfunction | ||
+ | |||
+ | " Rewire n and N to step-and-call-function | ||
+ | " Disabled by default because, if you step through many matches often, | ||
+ | " the blink delay can slow you down considerably. | ||
+ | " | ||
+ | " | ||
+ | |||
+ | " Settings for vim-taglist (http:// | ||
+ | nnoremap < | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | |||
+ | " Settings for vim-latex (http:// | ||
+ | set shellslash | ||
+ | set grepprg=grep\ -nH\ $* " | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | |||
+ | " Workaround for Gnome-Terminal bug showing >4;m escape sequence | ||
+ | set keyprotocol = "" | ||
+ | let &term = &term | ||
+ | </ | ||
+ | |||
+ | My .gvimrc: | ||
+ | |||
+ | < | ||
+ | highlight Normal guifg=green guibg=black | ||
+ | set guifont=Monospace\ 10 " | ||
+ | set lines=50 columns=150 | ||
+ | </ | ||
+ | |||
+ | My .vim/ | ||
+ | |||
+ | < | ||
+ | " To keep Vim from trying to syntax-highlight included source as LaTeX | ||
+ | " (http:// | ||
+ | syn region texZone | ||
+ | syn region texZone | ||
+ | syn match texInputFile " | ||
+ | </ | ||
+ | |||
+ | My .vim/ | ||
+ | |||
+ | < | ||
+ | let b: | ||
+ | </ |