-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
executable file
·42 lines (42 loc) · 1.14 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
set wildmenu " enable command completion
set lazyredraw
set showmatch
set incsearch
set hlsearch
set nocompatible "turn new features on
set foldenable " enable folding
set foldlevelstart=10
set foldmethod=indent
set showcmd
set modelines=4
imap jk <ESC> " map jk to <ESC> when in insert mode
syntax on
set cursorline
hi CursorLine term=bold cterm=bold
set cursorcolumn
hi CursorColumn term=bold cterm=bold ctermbg=0
set colorcolumn=80,120 " highlight columns 80 and 120
highlight ColorColumn ctermbg=6
set ignorecase " case insensitive while searching
set smartcase
set relativenumber
set number
nnoremap <CR> :noh<CR><CR>
nnoremap ; :
vnoremap ; :
set visualbell
set tabstop=4 shiftwidth=4 expandtab " use spaces instead of tabs, 4 spaces for each tab
inoremap <C-v> <ESC>"+pa
vnoremap <C-c> "+y
vnoremap <C-x> "+d
nnoremap te yy:execute 'terminal '.@"<cr> " set te to run the line in terminal
vnoremap te y:execute 'terminal '.@"<cr>
if version >= 600
filetype plugin indent on
endif
" when vim is invoked witout args, open the current dir with netrw
" Augroup VimStartup:
augroup VimStartup
au!
au VimEnter * if expand("%") == "" | e . | endif
augroup END