-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.vimrc
executable file
·45 lines (35 loc) · 1.29 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
" move parentheses to end of parameter list
nnoremap ) xep
nnoremap ( xbP
" pgup and pgdown in hjkl
nnoremap <C-j> <PageDown>
nnoremap <C-k> <PageUp>
nnoremap <C-p> :w<CR>:bprevious<CR>
nnoremap <C-n> :w<CR>:bnext<CR>
" tabs and line numbers
set expandtab
set tabstop=2
set shiftwidth=2
set number
execute pathogen#infect()
syntax on
filetype plugin indent on
" longest: select longest common substring
" menuone: show menu even if there is only one option
set completeopt=longest,menuone
" Enter in completion menu selects current item
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" Select first item when opening completion menu
inoremap <expr> <C-n> pumvisible() ? '<C-n>' : '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
" open omni completion menu closing previous if open and opening new menu without changing the text
inoremap <expr> <C-Space> (pumvisible() ? (col('.') > 1 ? '<Esc>i<Right>' : '<Esc>i') : '') .
\ '<C-x><C-o><C-r>=pumvisible() ? "\<lt>C-n>\<lt>C-p>\<lt>Down>" : ""<CR>'
imap <C-@> <C-Space>
" always display airline
set laststatus=2
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
" lenghtmatters config
call lengthmatters#highlight('ctermbg=0')
command Mdview %w !mdview