-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.minvimrc
147 lines (129 loc) · 3.84 KB
/
.minvimrc
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
"..... . ... .. ..
".d88888neu. 'l x*8888x.:*8888: -"888:
"... .. f""""*8888888f x 48888x `8888h 8888
":~""888h.:^"888: * `"*88*" x8x. 8888x 8888x !888>
"8x `8888x 8888> -.... ue=:. x8888 x8888 88888 "*8%-
"x888n. 8888x ?888> :88n ` '*888!x8888> x8888 xh8>
"'88888 8888x ?**h. 9888l `?8 `8888 x888x x888>
"`*88 8888~ x88x. uzu. `8888l -^ '888" x888 8888>
"..<" 88*` 88888x ,""888i ?8888 dx '88~x. !88~ 8888>
"..xc. `*8888k 4 9888l %888> .8888xf.888x:! x888x.:
":888888h. `%88> ' '8888 '88% :""888":~"888" `888*"
"< `"888888: x" "*8nu.z*" "~' "~ ""
"%888888x.-`
"""**""
"
" https://github.com/menketechnologies
"
source $VIMRUNTIME/defaults.vim
let mapleader = "\<space>"
set nocompatible " be improved, required
"for youcompleteme doc window to open at bottom
set splitright
set noswapfile
set nowritebackup
set ruler
set autoread
set ignorecase
set smartcase
set tabstop=4
"snap to nearest tabstop
set shiftround
set cindent
set ttyfast
"60 ms wait for next key in mappings
"set timeoutlen=300
"using powerline status bar instead
"set statusline+=%F
"set statusline+=%=
"set statusline+=Row:\%l
"set statusline+=/
"set statusline+=%L
"set statusline+=\
"set statusline+=Col:\ %c
"status bar always shown
set laststatus=2
set wrapscan
set t_Co=256
set backspace=2
set encoding=utf8
set showmatch
set showmode
set hlsearch
"search performed for each keypress
set incsearch
set mouse=a
set shiftwidth=4 "indent set to four spaces
set expandtab
"wrap lines
set linebreak
"line wrap indicator
set showbreak=-->
set number
set backupdir=~/tmp
set wildmenu "tab completion in command mode cycles through menu
set wildignorecase "globbing is case insensitive
syntax on
set grepprg=ag
"visual selection automatically into system clipboard
set guioptions+=a
set guifont=Hack\ Nerd\ Font:h14
"start browsing in current dir
set browsedir=current
"reduce enter key after message alerts
set shortmess=a
"show the leader
set showcmd
"visual mode automatically copies to system clipboard
set clipboard=autoselect
"show trailing spaces and tabs
set list listchars=tab:\ \ ,trail:·
"customize .viminfo
set viminfo='1000,<50,s10,h
"faster movements, used in all modes
noremap <c-j> 4j
noremap <c-k> 4k
noremap <c-h> 4h
noremap <c-l> 4l
noremap <leader>- 4-
noremap <leader>= 4+
"reselect after indenting
vnoremap < <gv
vnoremap > >gv
"copy to system clipboard and move cursor to end of selection
vnoremap <C-B> "*y`>
"copy to tmux clipboard
vnoremap <silent><leader>b :w !tmux set-buffer "$(cat)"<CR><CR>
noremap <silent><leader>sudo :w !sudo tee % &>/dev/null<CR><CR><CR>
"Ctrl-C exits like in shell
nnoremap <silent> <C-C> :wq!<CR>:qa!<CR>
"vnoremap <silent> <C-C> :<C-C>:wq!<CR>:qa!<CR>
inoremap <silent> <C-C> <C-[>:wq!<CR>:qa!<CR>
nnoremap <silent> <C-F> :q!<CR>
vnoremap <silent> <C-F> :<C-C>:q!<CR>
autocmd VimEnter * inoremap <silent> <C-F> <C-[>:q!<CR>
autocmd VimEnter * set background=dark
" dont hide json quotes
autocmd VimEnter * set conceallevel=0
inoremap <silent> <C-Z> <C-[>:suspend<CR>
vnoremap <RightMouse> "*y`>
inoremap <Home> <C-[>ggi
inoremap <End> <C-[>Gi
nnoremap <Home> gg
nnoremap <End> G
"comment out
inoremap <silent> <C-B> <ESC>I//<ESC>ji
inoremap <silent> <C-B><C-N> <ESC>^2xji
"nnoremap <silent> <C-I> :SaveSession<CR>
"vnoremap <silent> <C-I> :<C-C>:SaveSession<CR>
"inoremap <silent> <C-I> <C-[>:SaveSession<CR>a
nnoremap <silent> <leader>q :qa!<CR>
nnoremap <silent> <leader>c :wq!<CR>
nnoremap <silent> <leader>e :q!<CR>
nnoremap <silent> <leader>w :w!<CR>
"vertical split
nnoremap <silent> <leader>s :vs<CR>
"horizontal split
nnoremap <silent> <leader>h :sp<CR>
nnoremap <silent> <leader>t :tabnew<CR>
onoremap <silent> i# ?#<CR>jV/#<CR>kc