-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
48 lines (43 loc) · 1.1 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
filetype plugin indent on
set relativenumber
set autoindent
set shiftwidth=4
set tabstop=4
set textwidth=80
set expandtab
set foldmethod=indent
set autochdir
set noswapfile
syntax on
map <Up> <NOP>
map <Down> <NOP>
map <Left> <NOP>
map <Right> <NOP>
imap <Up> <NOP>
imap <Down> <NOP>
imap <Left> <NOP>
imap <Right> <NOP>
colorscheme slate
"Deal with mac backspace problem.
set backspace=2
set backspace=indent,eol,start
"Cursors
highlight Folded ctermbg=2
highlight TabLine ctermbg=2
"set cursorline
"highlight CursorLine ctermbg=2 cterm=NONE
"Filetypes
autocmd FileType js setlocal shiftwidth=2 tabstop=2
autocmd FileType python setlocal shiftwidth=4 tabstop=4
autocmd FileType go setlocal shiftwidth=8 tabstop=8
"Configs
let GITROOT = system("git rev-parse --show-toplevel")
"Leaders and vimrc commands
let mapleader=","
nnoremap <Leader>ev :tabedit $MYVIMRC<cr>
nnoremap <Leader>sv :source $MYVIMRC<cr>
nnoremap <Leader>rp :!python %<cr>
nnoremap <Leader>gr :cd `=GITROOT`<cr>:e
nnoremap <Leader>grt :cd `=GITROOT`<cr>:tabedit
nnoremap <Leader>grh :cd `=GITROOT`<cr>:sp
nnoremap <Leader>grv :cd `=GITROOT`<cr>:vs