Programmer's Note

コード読み書きの備忘録。

vimrcメモ

vimrcメモ。 プラグインも色々入れていたが、使用頻度が低いので思い切って削って、とりあえず必要最小限のものだけを残してみた。 運用していくうちにまた増えたりするかもしれんが。

だいたいがネットで検索した設定をコピペして、ミックスした感じだが。

set nocompatible

" Enable file type detection and do language-dependent indenting.
filetype plugin indent on

" Switch syntax highlighting on
syntax on

" Show line numbers
set number

" C indent setting
set cindent
set cinoptions+=:0 "Change indent rule of 'case' statement

" Tab width, no expand to space
set tabstop=4 shiftwidth=4 noexpandtab

" Highlight search word, increamental hightlight
set hlsearch
set incsearch

" Command Make will call make and then cwindow which
" open a 3 line error window if any errors are found.
" if no errors, it closes any open cwindow.
:command -nargs=* Make make <args> | cwindow  3
:map <Leader>j :Make<CR>

autocmd QuickFixCmdPost [^l]* nested cwindow
autocmd QuickFixCmdPost    l* nested lwindow

" for GLOBAL indexing
map <C-g> :Gtags
map <C-h> :Gtags -f %<CR>
map <C-f> :GtagsCursor<CR>
map <C-j> :cn<CR>
map <C-k> :cp<CR>