-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
72 lines (55 loc) · 1.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
" Setup -------------------------------------------------------------------;
let mapleader = "\\"
autocmd!
set nocompatible
set number
filetype off
" No plans to use Vim anywhere where this'd cause issues
set t_Co=256
syntax enable
syntax sync fromstart
" General -----------------------------------------------------------------;
"Move sanely
map j gj
map k gk
" Avoid typos
nmap ; :
" I prefer `B` and `E` to go to the beginning and end of lines
map B ^
map E $
nnoremap <leader>hl :noh<cr> " Disable search hilighting
set mouse=a
" Bits and pieces to make things `sane-ish`
set wildmenu " Mode-line completion
set nowrap " I hardly ever want to wrap code
set cursorline " Hilight the current line
set undofile " Keep track of undoable changes even after buffer closes
set undodir=~/.vim/undo
set vb " That annoying bell is no more!
set showcmd " Show incomplete command
set backspace=indent,eol,start " Backspace all the things
" Searching
set hlsearch " Hilight while searching
set incsearch " Incremental searching
" Whitespace
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smartindent
set shiftround
set relativenumber
set colorcolumn=140
" Switching between splits
nnoremap <leader>we <C-w>l
nnoremap <leader>wq <C-w>h
nnoremap <leader>ww <C-w>k
nnoremap <leader>ws <C-w>j
" Easily get back here
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
" Easier exit
inoremap jj <esc>
" Show current file path
nnoremap <leader>ff 1<C-G>
" Remove gui elements
set guioptions-=mTrL