-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
95 lines (72 loc) · 1.9 KB
/
vimrc
File metadata and controls
95 lines (72 loc) · 1.9 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
call pathogen#infect()
set visualbell
set tabstop=4
set softtabstop=4
set shiftwidth=4
if &compatible
set nocompatible
endif
" Have Vim jump to the last position when reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif
set number
map <F12> :set number!<CR>
imap <F12> <c-o>:set number!<CR>
syntax enable
set autoindent
set background=dark
colorscheme lucius
LuciusBlackHighContrast
filetype plugin on
" NERDTree
let g:NERDTreeDirArrows=0
map <F2> :NERDTreeToggle<CR>
" EasyMotion
let g:EasyMotion_leader_key = '<Leader>'
" Reselect visual block after indent/outdent
vnoremap < <gv
vnoremap > >gv
set expandtab
set smarttab
set backspace=indent,eol,start
set ignorecase
set smartcase
set hlsearch
" Highlight column if text exceeds over 80 characters
if exists('+colorcolumn')
highlight ColorColumn ctermbg=red
call matchadd('ColorColumn', '\%80v', 100)
else
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
endif
" Move through windows easier
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Disable arrow keys
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
" automatically reload vimrc when it's saved
au BufWritePost .vimrc so ~/.vimrc
" For faster startup of vim don't connect to the X Server
" Clipboard will be disabled as well as the window title
set clipboard=exclude:.*
" display tabs, nbsp and trailing spaces
set listchars=tab:>~,nbsp:_,trail:.
set list
" enable airline status bar
let g:airline#extensions#tabline#enabled = 1
set laststatus=2
if has('persistent_undo') "check if your vim version supports it
set undofile "turn on the feature
set undodir=$HOME/.vim/undo "directory where the undo files will be stored
endif