-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
113 lines (98 loc) · 2.34 KB
/
.vimrc
File metadata and controls
113 lines (98 loc) · 2.34 KB
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
if has('nvim')
call plug#begin('~/.config/nvim/plugged')
Plug 'MattesGroeger/vim-bookmarks'
Plug 'airblade/vim-gitgutter'
Plug 'dyng/ctrlsf.vim'
Plug 'epeli/neovim-config'
Plug 'kien/ctrlp.vim'
Plug 'majutsushi/tagbar'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
Plug 'terryma/vim-multiple-cursors'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Color Scheme
Plug 'phanviet/vim-monokai-pro'
Plug 'altercation/vim-colors-solarized'
Plug 'tomasr/molokai'
call plug#end()
else
set ttymouse=xterm2
set term=xterm-256color
endif
""" General Configuration
syntax on
filetype plugin indent on
set langmenu=en_US.UTF-8
colorscheme molokai
let g:rehash256=1
set autoindent
set cindent
set showmatch
set scrolloff=3
set incsearch
set nostartofline
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
" Highlighting search matches
set hlsearch
" Set Linenumber
set nu
set rnu
set mouse=a
set t_Co=256
" Change selection color as reverse
hi Visual term=reverse cterm=reverse
" ctags
set tags=./tags;
" cscope
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
if filereadable("./cscope.out")
cs add ./cscope.out
endif
set csverb
" Status Line
set list
set listchars=tab:>-,trail:-
set statusline=%F%m%r%h%w\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=\%04l,%04v][%p%%]\ [LEN=%L]
set laststatus=2
autocmd Filetype python setlocal ts=2 sw=2 sts=2 expandtab
" 80 Chars indicator
augroup vimrc_autocmds
au!
autocmd BufRead * highlight OverLength ctermbg=red ctermfg=white guibg=#592929
autocmd BufRead * match OverLength /\%81v.\+/
augroup END
""" PLUGIN Configuration
"" Airline
set encoding=utf-8
let g:airline_powerline_fonts = 1
let g:airline_enable_branch = 3
let g:airline_enable_syntastic = 1
let g:airline#extensions#hunk#enabled = 0
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#tabline#enabled = 1
"" NERDTree
let NERDTreeWinPos="left"
set modifiable
"" GitGutter
let g:gitgutter_realtime = 0
let g:gitgutter_eager = 0
""" Key Remapping
" NERDTree
nmap <F9> :NERDTreeToggle<CR>
nmap <leader>r :NERDTreeFind<CR>
" Split Windows
nmap <C-h> <C-w>h
nmap <C-j> <C-w>j
nmap <C-k> <C-w>k
nmap <C-l> <C-w>l
" For python
autocmd FileType python nnoremap <buffer> <F5> :!./%<CR>