-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
155 lines (128 loc) · 4.74 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
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
147
148
149
150
151
152
153
154
155
" Krish Subramaniam's .vimrc
" enable Pathogen
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
" vim addons to install for Pathogen
" see -- http://github.com/bronson/vim-update-bundles
" also see vim-scripts.org
" BUNDLE: git://github.com/vim-scripts/L9.git
" BUNDLE: git://github.com/vim-scripts/FuzzyFinder.git
" BUNDLE: git://github.com/vim-scripts/The-NERD-Commenter.git
" BUNDLE: git://github.com/vim-scripts/Align.git
" BUNDLE: git://github.com/vim-scripts/molokai.git
" BUNDLE: git://github.com/vim-scripts/vividchalk.vim.git
" BUNDLE: git://github.com/vim-scripts/desert256.vim.git
" BUNDLE: git://github.com/vim-scripts/jellybeans.vim.git
" BUNDLE: git://github.com/vim-scripts/python.vim--Vasiliev.git
" BUNDLE: git://github.com/vim-scripts/inkpot.git
" BUNDLE: git://github.com/vim-scripts/darkspectrum.git
" BUNDLE: git://github.com/vim-scripts/indentpython.vim
" BUNDLE: git://github.com/vim-scripts/rdark.git
" BUNDLE: git://github.com/vim-scripts/LustyJuggler.git
" BUNDLE: git://github.com/nathanaelkane/vim-indent-guides.git
" BUNDLE: git://github.com/vim-scripts/moin.vim
" BUNDLE: git://github.com/vim-scripts/pep8.git
" BUNDLE: git://github.com/kien/ctrlp.vim
" BUNDLE: git://github.com/vim-scripts/tir_black.git
" BUNDLE: git://github.com/vim-scripts/zenesque.vim.git
" BUNDLE: git://github.com/vim-scripts/tango-morning.vim.git
" BUNDLE: git://github.com/vim-scripts/vylight.git
filetype plugin indent on
set nocompatible
set mouse=a
syntax enable " syntax highlighting
set bs=indent,eol,start
set showmatch
" 256 color mode
" ********************************************************************
set t_Co=256
"if &t_Co == 256
" colorscheme inkpot
"endif
" Indenting
" ********************************************************************
set ai " Automatically set the indent of a new line (local to buffer)
set si " smartindent (local to buffer)
set cindent
set shiftwidth=4
set expandtab
set tabstop=4
" Windows
" *********************************************************************
set equalalways " Multiple windows, when created, are equal in size
set splitbelow splitright
" Searching
" *******************************************************************
set hlsearch " highlight search
set incsearch " incremental search, search as you type
set ignorecase " Ignore case when searching
set smartcase " Ignore case when searching lowercase
" Colors
" **********************************************************************
"set t_Co=256 " 256 colors
" color scheme
color desert
" line number and width
set number
set nuw=6
set ruler " show the cursor position in the bottom right corner
set cursorline "highlight current line
set showcmd " display incomplete commands
set digraph " enable digraphs, needed for special characters
set hidden " enable hidden files
set magic " enable advanced regular expression in searches
" Abbreviations
" "
iab _DATE <C-R>=strftime("%A, %B %e %Y %I:%M:%S %p %Z")<CR>
" Evil spaces and tabs are highlighted!
"highlight LeadingTab ctermbg=blue guibg=blue
"highlight LeadingSpace ctermbg=darkgreen guibg=darkgreen
highlight EvilSpace ctermbg=darkred guibg=darkred
"au Syntax * syn match LeadingTab /^\t\+/
"au Syntax * syn match LeadingSpace /^\ \+/
"au Syntax * syn match EvilSpace /\(^\t*\)\@<!\t\+/ " tabs not preceeded by tabs
"au Syntax * syn match EvilSpace /[ \t]\+$/ " trailing space
" Command completion just like shell
set wildmode=list:longest
" set visual bell ( disables audio bell )
set visualbell
" set leader key ,
let mapleader = ","
" FuzzyFinder settings
let g:FuzzyFinderOptions = { 'Base':{}, 'Buffer':{}, 'File':{}, 'Dir':{}, 'MruFile':{}, 'MruCmd':{}, 'FavFile':{}, 'Tag':{}, 'TaggedFile':{}}
let g:FuzzyFinderOptions.Base.ignore_case = 1
let g:FuzzyFinderOptions.Base.lasting_cache = 1
let g:FuzzyFinderOptions.MruFile.max_item = 500
let g:FuzzyFinderOptions.MruCmd.max_item = 500
nmap <leader>f :FufFile<CR>
nmap <leader>b :FufBuffer<CR>
nmap <leader>c :FufMruCmd<CR>
nmap <leader>F :FufMruFile<CR>
nmap <leader>n :bn<CR>
"keymappings
" tab to switch between windows
map <F6> <C-W>w
map <F2> :NERDTreeToggle<CR>
"Taglist
let Tlist_Ctags_Cmd = "/usr/bin/ctags"
let Tlist_WinWidth = 50
map <F4> :TlistToggle<cr>
map <F3> :!/usr/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q
"disable arrow keys and help
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
inoremap <F1> <ESC>
nnoremap <F1> <ESC>
vnoremap <F1> <ESC>
" IndentGuides Setting (for Python )
" Press ,ig for displaying it
let g:indent_guides_start_level=2
let g:indent_guides_guide_size=1
"statusline
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]