summaryrefslogtreecommitdiff
path: root/vim/vimrc
blob: 7bcd1d97623391c2817cb2d1a21241805cd96c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
set nocompatible
set backspace=indent,eol,start
set history=50
set ruler
set number
set showcmd
set showmatch
set showmode
set lazyredraw
set hlsearch
set incsearch
set nobackup
set writebackup
set nojoinspaces
set wildmenu
set wildmode=longest,list
set background=dark
set tabstop=8
set expandtab
set shiftwidth=4
set softtabstop=4
set scrolloff=5

packadd! taglist

syntax on
hi CursorColumn cterm=none ctermbg=blue ctermfg=none

:let columns=['0', '80']
:let &cc=columns[0]

nmap <silent> <F2> :!cscope -buR<CR>:cs kill -1<CR>:cs add cscope.out<CR>
nmap <silent> <F3> <C-W>v<C-W>w:lcd %:p:h<CR>:vnew +:read\ !git\ diff\ #<CR>:set buftype=nofile<CR>:set bufhidden=delete<CR>:set noswapfile<CR>:set filetype=diff<CR><C-W>w:x<CR>
nmap <silent> <F4> <C-W>v<C-W>w:lcd %:p:h<CR>:vnew +:read\ !svn\ diff\ #<CR>:set buftype=nofile<CR>:set bufhidden=delete<CR>:set noswapfile<CR>:set filetype=diff<CR><C-W>w:x<CR>
nmap <silent> <F5> :TlistToggle<CR>
nmap <silent> <F6> :Vexplore!<CR>
nmap <silent> <F7> :set cursorcolumn!<CR>
nmap <silent> <F8> :let &cc=columns[(index(columns, &cc) + 1) % len(columns)]<CR>
nmap <silent> <F10> :set noexpandtab<CR>:set tabstop=4<CR>:set shiftwidth=4<CR>:set softtabstop=4<CR>
nmap <silent> <F11> :set expandtab<CR>:set tabstop=8<CR>:set shiftwidth=4<CR>:set softtabstop=4<CR>
nmap <silent> <F12> :set noexpandtab<CR>:set tabstop=8<CR>:set shiftwidth=8<CR>:set softtabstop=8<CR>

nmap <silent> <C-N> :silent noh<CR>
nmap <silent> <C-P> :set nowrap!<CR>:set nowrap?<CR>