-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc
86 lines (69 loc) · 3.12 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
call pathogen#incubate()
call pathogen#helptags()
" ------------------------------- GENERAL OPTIONS -----------------------------
set showcmd
set nu " line numbers
set nocompatible " use Vim defaults (much better!)
set ruler " show the cursor position all the time
set showmatch " show matching opening bracket/paren. when closing
set incsearch " incremental search (google instant)!
set ignorecase " don't pay attention to case when searching
set smartcase " if 1 or more characters are upper case search
set hlsearch " Always highlight search term
set autoindent " Copy indent from current line when starting new line
set wildmenu " Completion for commands
set mouse=a " allow the mouse in the terminal
syntax on " Always want syntax highlighting
filetype plugin on
" ------------------------------- SPACING -------------------------------------
set colorcolumn=80 " Show line at 80 columns
"set tw=79 " text width
set sw=4 " shift width
set sts=4 " soft tab stop (number of spaces to insert for tab)
set ts=4 " tab stop
set expandtab " Expand tab characters to spaces
set wiw=80 " Min. number of columns in window
set bs=2 " allow backspacing over everything in insert mode
set autoindent " Intelligent indenting based on previous line, etc.
set wrap " Wrap lines longer than textwidth (tw)
" ------------------------------- COLORS --------------------------------------
set t_Co=256
colorscheme alduin
set cursorline
set cursorcolumn
" ----------------------------- WHITESPACE ------------------------------------
:set list!
:set list listchars=tab:>-,trail:.,extends:>
" ------------------------------- TAGS ----------------------------------------
" let &tags = findfile("tags", "**;")
" ----------------------------- ULTISNIPS -------------------------------------
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsEditSplit="context"
let g:UltiSnipsSnippetDirectories=["UltiSnips"]
" ------------------------------- MAPS ----------------------------------------
map <A-q> :close<CR>
map <C-o> :browse confirm e<CR>
map <C-l> gt
map <C-right> :tabm +1<CR>
map <C-left> :tabm -1<CR>
map <C-h> gT
map <C-j> <C-d>
map <C-k> <C-u>
map <C-p> <C-w>q
map <C-o> :tabnew
" kk is easier to hit than Esc
inoremap kk <Esc>
" use '%%' to auto-complete current directory
cabbr <expr> %% expand('%:p:h')
" ------------------------------- Syntastic -----------------------------------
let g:syntastic_python_checkers = ['pylint3']
let g:syntastic_go_checkers = ['golint']
" ------------------------- Auto-Discover Typescript --------------------------
augroup SyntaxSettings
autocmd!
autocmd BufNewFile,BufRead *.tsx set filetype=typescript
autocmd BufNewFile,BufRead *.ts set filetype=typescript
augroup END
" ---------------------- FileType Specific Formatting -------------------------
autocmd FileType javascript :setlocal ts=2 sw=2 sts=2
autocmd FileType typescript :setlocal ts=2 sw=2 sts=2