-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
143 lines (124 loc) · 3.38 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
"-------------------- BASIC SETUP --------------------
let mapleader=" "
set autoindent
set autoread
set backspace=indent,eol,start
set clipboard=unnamed
set encoding=utf-8
set expandtab
set fileencoding=utf-8
set fileformat=unix
set fileformats=unix,dos
set hidden
set history=1000
set hlsearch
set ignorecase
set incsearch
set lazyredraw
set nobackup
set nocompatible
set noswapfile
set nowrap
set number
set ruler
set scrolloff=3
set shell=bash
set shiftwidth=2
set smartcase
set smartindent
set softtabstop=2
set textwidth=140
set wildmode=list:longest
set writebackup
syntax on
filetype indent on
filetype on
filetype plugin on
" ---------------------- PLUGIN CONFIGURATION ----------------------
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Vue
let g:vue_disable_pre_processors=1
" NERDTree
let NERDTreeShowHidden=1
" Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint')
let b:syntastic_javascript_eslint_exec = substitute(s:eslint_path, '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '')
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_scss_checkers = ['sass_lint']
let g:syntastic_mode_map = {"mode": "pasive", "passive_filetypes": ["html"]}
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'L9'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'git://github.com/pangloss/vim-javascript.git'
Plugin 'git://github.com/vim-python/python-syntax.git'
Plugin 'git://github.com/tpope/vim-dispatch.git'
Plugin 'git://github.com/rafi/awesome-vim-colorschemes.git'
Plugin 'tomasiser/vim-code-dark'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'jlanzarotta/bufexplorer'
Plugin 'mhinz/vim-signify'
Plugin 'mileszs/ack.vim'
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'posva/vim-vue'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-surround'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
call vundle#end()
autocmd VimEnter * wincmd p
autocmd FileType vue syntax sync fromstart
" Vue syntax highligting
autocmd BufNewFile,BufRead *.vue set ft=vue
let g:javascript_plugin_jsdoc = 1
let g:python_highlight_all = 1
let g:ack_use_dispatch = 1
" --------------------- KEY MAPPINGS -------------------
" Nerdtree
let NERDTreeIgnore = ['\.pyc$', '\.DS_Storage', '\.idea' ]
nmap <leader>n :NERDTree<CR>
" Buffer Explorer
map <leader>b :BufExplorer<return>
" Navigation
map <leader><tab> <c-w>w
nmap H ^
vmap H ^
nmap L $
vmap L $
nmap J <C-d>
vmap J <C-d>
nmap K <C-u>
vmap K <C-u>
" Edit common files
map <leader>1 :e ~/.vimrc<enter>
map <leader>2 :e ~/.zshrc<enter>
map <leader>ww :w<enter>:so %<enter>
" Toggle Syntastic Mode
nmap <leader>t :SyntasticToggleMode<enter>
" Surround
vmap <leader>' S'
vmap <leader>" S"
" Ack Motions
vnoremap <leader>as y:Ack <C-r>=fnameescape(@")<CR><CR>
noremap <leader>aw :Ack <cword><cr>
" -------------------- Macros --------------------
" Converts current line to a console log
let @l = 'Iconsole.log(A);'
let @h = 'I<lywA></pA>hcit'
nmap <leader>lg @l
nmap <leader>h @h
" -------------------- Theming --------------------
set background=dark
set termguicolors
colorscheme codedark
let g:deepspace_italics=1
highlight ColorColumn ctermbg=lightgray guibg=lightgray