forked from nickaigi/configs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
110 lines (70 loc) · 3.62 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
" This is the personal .vimrc file of Nickson Kaigi.
" While much of it is beneficial for general use, I would
" recommend picking out the parts you want and understand,
" as I have done from other notable vim purists
"
set nocompatible "Use Vim settings, rather than Vi settings
"Be IMproved
filetype off "required!
" I use Vundle https://github.com/gmarik/vundle as my
" preferred plugin manager.... never got the hang of
" vim-pathogen (no offence to the pathogen community)
"
"
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'Valloric/YouCompleteMe'
Bundle 'sophacles/vim-bundle-mako'
Bundle 'bling/vim-airline'
Bundle 'walm/jshint.vim'
filetype plugin indent on "required!
set backspace=indent,eol,start "allow backspacing over everything in insert mode
set history=50 "keep 50 lines of command line history
set ruler "show the cursor position all the time
set showcmd "display incomplete commands
set incsearch "do incremental searching
set nu "show line numbers
set expandtab "use spaces instead of tabs
set tabstop=4 "insert 4 spaces whenever the tab key is pressed
set shiftwidth=4 "set indentation to 4 spaces
set hlsearch "highlight search terms
set ic "Ignore Case during searches
set autoindent "start new line at the same indentation level
syntax enable "syntax highlighting
set cmdheight=1 "The commandbar height
set showmatch "Show matching bracets when text indicator is over them
set nobackup " do not keep backup files, it's 70's style cluttering
set noswapfile " do not write annoying intermediate swap files,
" who did ever restore from swap files
" anyway?
" https://github.com/nvie/vimrc/blob/master/vimrc#L141
" VIM airline config
set laststatus=2 " Solves: statusline does not appear until I create a split
set noshowmode " Get rid of the default mode indicator
let g:airline_powerline_fonts = 1 " Use powerline symbols
set t_Co=256 " Force Vim into 246 color mode, to display airline colors
let g:arline_theme = 'light' " Self explanatory
" End of airline configs
colorscheme peachpuff " Original colorscheme on the bash shell... I got used to it
set ttimeoutlen=50 "Solves: there is a pause when leaving insert mode
" highlight characters past column 80
augroup vimrc_autocmds
autocmd!
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%80v.*/
autocmd FileType python set nowrap
augroup END
set splitbelow " Horizontal splits open below current file
set splitright " Vertical splits open to the right of the current file
set wildmode=longest,list " Pressing <Tab> shows command suggestions similar to pressing <Tab>
" in bash
" Mappings to traverse buffer list
nnoremap <silent> [b :bprevious<CR>
nnoremap <silent> ]b :bnext<CR>
nnoremap <silent> [B :bfirst<CR>
nnoremap <silent> ]B :blast<CR>
"Easy expansion of the active file directory
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'
"Shortcut to Mute Highlighting
nnoremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l>