-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
122 lines (103 loc) · 3.51 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
set nocompatible " be iMproved, required for Vundle
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'bling/vim-airline'
Plugin 'dracula/vim', {'name': 'dracula'}
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
"Plugin 'pangloss/vim-javascript'
"Plugin 'briancollins/vim-jst'
"Plugin 'udalov/kotlin-vim'
Plugin 'liuchengxu/vista.vim'
"Plugin 'Valloric/YouCompleteMe'
call vundle#end() " required
"filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" ==== general settings ====
let mapleader = "," " rebind <Leader> key
set autoread
set nobackup
set nowritebackup
set noswapfile
" ==== Plugin Configs ====
" = AIRLINE:
set laststatus=2
set guifont=Source\ Code\ Pro\ Medium\ 12
" = NERDTree
let NERDTreeWinPos='right'
noremap <Leader>k :NERDTreeToggle<cr>
noremap <Leader>j :Vista!!<cr>
noremap \nf :NERDTreeFind<cr>
map <F9> :NERDTree<cr>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
autocmd BufWinEnter * NERDTreeMirror
let NERDTreeShowLineNumbers=1
" ==== Appearance ========
syntax on
set number
set cursorline
set nofoldenable
set expandtab " Make sure that every file uses spaces
set shiftround " Round indent to multiple of 'shiftwidth'
set autoindent " Copy indent from current line, over to the new line
set shiftwidth=2
set tabstop=2
" Set the tab width and overwrite FileType specific options
let s:tabwidth=2
au Filetype * let &l:tabstop = s:tabwidth
au Filetype * let &l:shiftwidth = s:tabwidth
au Filetype * let &l:softtabstop = s:tabwidth
" colors and themes
set t_Co=256
set background=dark
colorscheme dracula
" this fixes background problems in putty
highlight Normal ctermbg=NONE
highlight nonText ctermbg=NONE
highlight CursorLine ctermbg=NONE
" special files
au BufNewFile,BufRead *.ejs set filetype=jst
" ==== keyboard shortcuts ====
map <Leader>m :tabn<CR>
map <Leader>n :tabp<CR>
vmap <F7> :w !xclip -i -sel c<CR><CR>
nmap <F8> :r !xclip -o -sel -c<CR>
nnoremap " '| " remap 'jump to mark' to "
" bind Ctrl+<movement> keys to move around the windows, instead of using
" Ctrl+w + <movement>
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
" ==== run current file and display output in new buffer ====
"nnoremap <C-h> :w<CR>:let g:file = expand("%:p")<CR>:new<CR>:execute "read !".g:file<CR><CR>:q!
"inoremap <C-h> <ESC>:w<CR>:let g:file = expand("%:p")<CR>:new<CR>:execute "read !".g:file<CR><CR>:q!
" ==== html and php key bindings ===
autocmd Filetype html,php nmap <F6> :w \| ! uml %<CR><CR>
let g:NERDTreeDirArrowExpandable="+"
let g:NERDTreeDirArrowCollapsible="~"
" === include PC specific addons ===
for rcfile in split(globpath("~/.vim/includes", "*.vim"), '\n')
"echom "Including ".rcfile
execute('source '.rcfile)
endfor
" === formatting ===
" do not indent #-comments
set cinkeys-=0#
set indentkeys-=0#
set guifont=SauceCodePro\ Nerd\ Font\ Mono