forked from listrophy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc.local.example
91 lines (75 loc) · 1.92 KB
/
.vimrc.local.example
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
syntax on
filetype plugin indent on
"colorscheme vividchalk
set autoindent
set background=dark
set backupdir=~/.vimbackupdir,~/tmp,~/,.
set directory=~/.vimbackupdir,~/tmp,~/,.
set expandtab
set filetype=sh
set guifont=Inconsolata:h16
set guioptions-=T guioptions-=e guioptions-=L guioptions-=r
set hlsearch
set ignorecase
set listchars=tab:⇀\ ,trail:␠
set matchpairs+=<:>
set modeline
set modelines=5
set number
set wrap
set ruler
set shell=bash
set shiftwidth=2
set showmatch
set sts=2
set tabstop=2
set tildeop
set visualbell
set wildmenu
set wildmode=longest,list,full
set viminfo='10,\"100,:20,%,n~/.viminfo
function! ResCur()
if line("'\"") <= line("$")
normal! g`"
return 1
endif
endfunction
augroup resCur
autocmd!
autocmd BufWinEnter * call ResCur()
augroup END
au! BufRead,BufNewFile *.rb
au! BufRead,BufNewFile *.xml
au BufRead,BufNewFile *.scss set filetype=sass
" CocoaPods
au BufRead,BufNewFile Podfile,*podspec set filetype=ruby
" Fix trailing whitespace
command! -bar -range=% Trim :<line1>,<line2>s/\s\+$//e
" find current file in NERDTree
map <silent> <C-s> :NERDTree<CR>:wincmd l<CR>:NERDTreeFind<CR>
let NERDTreeIgnore=['instrumentscli\d\+\.trace', '\~$']
" clear search
nmap <silent> ,/ :nohlsearch<CR>
nmap \\ <plug>NERDCommenterToggle<CR>
vmap \\ <plug>NERDCommenterToggle<CR>
map <silent> <C-h> :wincmd h<CR>
map <silent> <C-Left> :wincmd h<CR>
map <silent> <C-k> :wincmd k<CR>
map <silent> <C-Up> :wincmd k<CR>
map <silent> <C-j> :wincmd j<CR>
map <silent> <C-Down> :wincmd j<CR>
map <silent> <C-l> :wincmd l<CR>
map <silent> <C-Right> :wincmd l<CR>
map <silent> <C-Z> :retab<CR> :Trim<CR>
map <C-J> ddp
map <C-K> ddkP
map <silent> <D-1> :tabn 1<CR>
map <silent> <D-2> :tabn 2<CR>
map <silent> <D-3> :tabn 3<CR>
map <silent> <D-4> :tabn 4<CR>
map <silent> <D-5> :tabn 5<CR>
map <silent> <D-6> :tabn 6<CR>
map <silent> <D-7> :tabn 7<CR>
map <silent> <D-8> :tabn 8<CR>
map <silent> <D-9> :tabn 9<CR>
map Y y$