-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc_with_plugins
executable file
·142 lines (112 loc) · 3.94 KB
/
vimrc_with_plugins
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
set fileencoding=utf8
source /usr/local/lib/python2.7/site-packages/powerline/bindings/vim/plugin/powerline.vim
set nocompatible ""Disable vi compatibility
filetype on "Avoids bug when comiting stuff
filetype off "Force reloading of stuff after pathogen is loaded
execute pathogen#infect()
execute pathogen#helptags()
""Make actionscript syntax works
syntax on
filetype plugin indent on
au BufNewFile,BufRead *.as set filetype=actionscript
au BufNewFile,BufRead *.hx set filetype=haxe
au BufNewFile,BufRead *.json set filetype=json
""Visual help stuff
set nu
set ai
set lcs=tab:>-,eol:$
set list
set incsearch ""Set incremental search
set hlsearch ""Highlight search results
set ignorecase ""Ignore capital letters when searching in all lower case
set smartcase ""Search using capital letter if a capital letter was typed on search
set encoding=utf-8 nobomb "Avoids BOM and make sure to always use utf-8
""More custom options
set history=999
set undolevels=999
set nobackup
set nowritebackup
set noswapfile
set laststatus=2
set mouse=nicr
""No timeout between shortcut keys
set notimeout
""Formating...
set expandtab ""Insert space chars instead of tab
set autoindent smartindent ""Hope this make indenting stuff easier
set copyindent
set tabstop=4 ""Default number of spaces a tab takes
set shiftwidth=4
set softtabstop=4 ""Allow deletion of whole tabs
set backspace=indent,eol,start
set wildignore+=*.orig,*.svn,*.hg,*.git,*.pyc ""Ignore all these annoying extensions
set wildignore+=*/node_modules/*
set wildignore+=*/bower_components/*
""Activate different settings for different file types
autocmd FileType html,htmldjango,xml,ctp set noexpandtab shiftwidth=2 tabstop=2 softtabstop=2
autocmd FileType actionscript,haxe,php set noexpandtab shiftwidth=4 tabstop=4 softtabstop=4
autocmd BufNewFile,BufRead *.md,*.mkdn,*.markdown :set filetype=markdown
""Ignore these types of files
set wildignore+=*.o,*.obj,.git,*.png,*.PNG,*.JPG,*.jpg,*.GIF,*.gif,*.pdf,*.mp3,*.avi,*.mp4,*.webm,*.pyc
""Colorscheme stuff
let g:solarized_visibility='low'
let g:solarized_contrast='high'
colorscheme solarized
set background=dark
""Uses system clipboard for yanking, only works with vim 7.3+
set clipboard+=unnamed
"" Set the leader to comma
let mapleader=","
let g:mapleader=","
"" Command-t options
let g:CommandTMaxFiles=20000
let g:CommandTMaxDepth=20
"" Set easy motion to use only one leader stroke
let g:EasyMotion_leader_key = '<Leader>'
"" Change signify default navigation keys
let g:signify_mapping_next_hunk = '<C-m>'
let g:signify_mapping_prev_hunk = '<C-p>'
let g:signify_mapping_toggle_highlight = '<C-g>'
let g:signify_mapping_toggle = '<C-t>'
"" I don't want any buffkill keymap
let g:BufKillCreateMappings = 0
"" Uses eslintme
let g:syntastic_check_on_open = 1
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_javascript_eslint_generic = 1
let g:syntastic_javascript_eslint_exec = 'eslintme'
"" Make arrow keys works for wrapped lines$
map <up> gk
map <down> gj
"" Remap tab on normal mode to switch between buffers
nnoremap <silent> <tab> <C-^>
"" Better nerdtoolbar shortcut$
nnoremap <silent> <leader><tab> :NERDTreeToggle<cr>
"" Remap command-t shortcuts
nnoremap <silent> <leader>g :CommandT<cr>
nnoremap <silent> <leader>h :CommandTBuffer<cr>
nnoremap <silent> <leader>p :YRShow<cr>
"" Gundo map
nnoremap <F5> :GundoToggle<CR>
"" Make ctrl+hjkl switch between splited screens
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
"" Configs splitjoin keys
nmap sj :SplitjoinSplit<cr>
nmap sk :SplitjoinJoin<cr>
"" Moving block selection
xmap <C-k> :mo'<-- <CR> gv
xmap <C-j> :mo'>+ <CR> gv
nnoremap <C-N> :tabnew<cr>
nnoremap <C-x> :tabclose<cr>
"" Make arrows switch between buffers
nnoremap <Left> :bprevious<CR>
nnoremap <Right> :bnext<CR>
"" tern_for_vim
nnoremap <F6> :TernDef<CR>
" :w!!
" write the file when you accidentally opened it without the right (root) privileges
cmap w!! w !sudo tee % > /dev/null
" let g:JSHintHighlightErrorLine = 0