-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim
94 lines (67 loc) · 2.08 KB
/
init.vim
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
set nocompatible
syntax enable
filetype off
set laststatus=2
set ignorecase
set showcmd
set number
set undodir=~/.vim/backup/.undo//
set backupdir=~/.vim/backup/.backup//
set directory=~/.vim/backup/.swp//
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
" Languages
" Ansible
Plugin 'pearofducks/ansible-vim'
" Javascript
Plugin 'pangloss/vim-javascript'
" Typescript
Plugin 'leafgarland/typescript-vim'
" Linters
" Asynchronous Lint Engine
Plugin 'w0rp/ale'
Plugin 'editorconfig/editorconfig-vim'
" Navigation
Plugin 'scrooloose/nerdtree'
Plugin 'jlanzarotta/bufexplorer'
Plugin 'mileszs/ack.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'justinmk/vim-sneak'
Plugin 'terryma/vim-multiple-cursors'
" Interface
Plugin 'vim-airline/vim-airline'
" Functionality
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdcommenter'
Plugin 'AndrewRadev/splitjoin.vim'
call vundle#end()
filetype plugin indent on
" auto remove trailing whitespaces
autocmd BufWritePre * %s/\s\+$//e
command! E NERDTreeToggle
map <C-e> :NERDTreeFocus<CR>
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let NERDTreeShowHidden=1
" javascrtipt settings
let g:javascript_plugin_jsdoc = 1
" typescript settings
autocmd FileType typescript setlocal completeopt+=menu,preview
autocmd Filetype javascript setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype json setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype yaml setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype scss setlocal ts=4 sw=4 sts=0 expandtab
autocmd Filetype html setlocal ts=4 sw=4 sts=0 expandtab
" NERD commenter settings
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
" Use compact syntax for prettified multi-line comments
let g:NERDCompactSexyComs = 1
" Align line-wise comment delimiters flush left instead of following code indentation
let g:NERDDefaultAlign = 'left'
" Allow commenting and inverting empty lines (useful when commenting a region)
let g:NERDCommentEmptyLines = 1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1
let g:airline_powerline_fonts = 1