-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
executable file
·94 lines (76 loc) · 2.72 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
".vimrc of Thales at elis/sinmec
"the following was copied from the following sources:
"https://stackoverflow.com/questions/6467634/create-a-command-shortcut-for-nerdtree-in-vim-editor
"Pathogen is a plugin manager
execute pathogen#infect()
call pathogen#helptags()
set nocompatible " be iMproved, required
filetype plugin indent on
set number relativenumber nowrap
filetype plugin on
syntax on
"Autocomplete brackets
noremap " ""<left>
inoremap ' ''<left>
inoremap [ []<left>
inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O
"TAB navigation
nnoremap <C-h> :tabprevious<CR>
nnoremap <C-l> :tabnext<CR>
nnoremap <C-t> :tabnew<CR>
inoremap <C-h> <Esc>:tabprevious<CR>i
inoremap <C-l> <Esc>:tabnext<CR>i
inoremap <C-t> <Esc>:tabnew<CR>
"NERDTree configuration
map <silent> <C-n> :NERDTreeToggle<CR>
let NERDTreeIgnore = ['\.pyc$','\.vts$','\.dat$','\.dat.info$','\.o$']
" fix to a strange register bug
unmap "
" command for wipe the all the registers
command! WipeReg for i in range(34,122) | silent! call setreg(nr2char(i), []) | endfor])))
"map to clear highlight
nnoremap <Leader><space> :noh<cr>
"map <C-e> to jump to end of line on insert mode
inoremap <C-e> <C-o>$
"map <C-g> to jump to beginning of line on insert mode
inoremap <C-g> <C-o>0
" List contents of all registers (that typically contain pasteable text).
" https://superuser.com/questions/656949/always-show-the-register-list-in-vim/662063
nnoremap <silent> "" :registers "0123456789abcdefghijklmnopqrstuvwxyz*+.<CR>
"Syntastic noob configuration:
"set statusline+=%#warningmsg#
"set statusline+=%{SyntasticStatuslineFlag()}
"set statusline+=%*
"let g:syntastic_always_populate_loc_list = 1
"let g:syntastic_auto_loc_list = 1
"let g:syntastic_check_on_open = 0
"let g:syntastic_check_on_wq = 0
"let g:syntastic_python_python_exec = 'python'
"" let g:syntastic_python_checkers = ['python']
"let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': [],'passive_filetypes': [] }
"nnoremap <C-w>E :SyntasticToggleMode<CR> \| :SyntasticCheck<CR>
"
""Neomake
"autocmd! BufReadPost,BufWritePost * Neomake
"let g:neomake_serialize = 1
"let g:neomake_serialize_abort_on_error = 1
" Set mouse mode
set mouse=a
"Highlight current line and column
:hi CursorLine cterm=NONE ctermbg=darkgray ctermfg=white guibg=darkred guifg=white
:hi CursorColumn cterm=NONE ctermbg=darkgray ctermfg=white guibg=darkred guifg=white
:nnoremap <Leader>c :set cursorcolumn! <CR>
set cursorline
" Lightline config
set laststatus=2
" Shortcut to :w
noremap <Leader>s :update<CR>
" On pressing tab, insert 2 spaces
set noexpandtab
" show existing tab with 2 spaces width
" set tabstop=4
" set softtabstop=4
" " when indenting with '>', use 2 spaces width
" set shiftwidth=4