-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
executable file
·128 lines (104 loc) · 2.74 KB
/
.vimrc
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
" vim: set ts=2 sts=2 sw=2 et:
execute pathogen#infect()
set nocompatible
set ttimeoutlen=10
set noerrorbells
set listchars=tab:>\-,nbsp:.,extends:#,trail:\!
set nowrap
let &showbreak="> "
set ignorecase
" This is off by default in current Arch and in Centos7 according to docs
" but unexpectedly it is actually on on Centos7. Let's set it to no explicitly.
set nohlsearch
" supertab is currently does not work with smartcase
" set smartcase
set ruler
if exists('+undofile')
set undofile
endif
set diffopt=filler,vertical
" centos7 version does not support closeoff
silent! set diffopt+=closeoff
set imsearch=-1
set keymap=russian-colemakwin
set iminsert=0
set encoding=utf-8
set fileformat=unix
set completeopt=menu,preview,longest
set wildmode=longest,list
set wildignorecase
set hidden
set gdefault
set formatoptions=qr1
set showcmd
syntax on
filetype plugin indent on
colorscheme wombat256
" stopped here
" keymappings
" ===========
" colemak motions
map j <Left>
map l <Right>
map h <Up>
map k <Down>
" colemak motions when moving between windows
nmap <C-j> <C-W><Left>
nmap <C-l> <C-W><Right>
nmap <C-h> <C-W><Up>
nmap <C-k> <C-W><Down>
" colemak motions when moving windows
nnoremap <C-W>J <C-W>H
nnoremap <C-W>L <C-W>L
nnoremap <C-W>H <C-W>K
nnoremap <C-W>K <C-W>J
" some mappings that more useful then defaults
" find match of brakets etc with Tab
nnoremap <tab> %
vnoremap <tab> %
" fast leader mappings
" ====================
" set leader eary or it could be the source of wtf
" I guess , main usage is to go back if you pressed ; extra times. Well
" one can just use revert motion f<->F for this purpuse. I guess ; isn't
" over pressed regularly.
let mapleader=","
nmap <leader>/ :setlocal hlsearch!<CR>
nmap <leader>l :setlocal list! list?<CR>
nmap <leader>p :setlocal paste! paste?<CR>
" r for recent
nnoremap <leader>r :BufExplorer<CR>
" o for open
nnoremap <leader>o :FZF<CR>
" b for blame
nnoremap <leader>b :Git blame<CR>
" s for search
nnoremap <leader>s :grep -RI '\<<C-R><C-W>\>'<space>
" slower leader mappings
" ======================
" strip trailing whitespaces
nnoremap <leader><leader>s :%s/\s\+$//<CR>:let @/=''<CR>
" tune plugins settings
" =====================
" easymotion
let g:EasyMotion_leader_key='<leader>'
let g:EasyMotion_mapping_j='<leader>k'
let g:EasyMotion_mapping_k='<leader>h'
" supertab
let g:SuperTabDefaultCompletionType="<c-n>"
let g:SuperTabLongestEnhanced=1
" bufexplorer
let g:bufExplorerShowRelativePath=1
" more enhanced tunings
" =====================
" set color column but not for help
if exists('+colorcolumn')
augroup color-column
autocmd!
autocmd FileType * setlocal colorcolumn=80
autocmd FileType help,bufexplorer setlocal colorcolumn=0
augroup END
endif
if filereadable(".lvimrc")
so .lvimrc
endif