-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
146 lines (115 loc) · 4.39 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
144
145
146
"http://www.vim.org/scripts/script.php?script_id=2332
execute pathogen#infect()
syntax on
filetype plugin indent on
"http://kennedysgarage.com/articles/nerdtree
"Give a shortcut key to NERD Tree
map <F2> :NERDTreeToggle<CR>
map <F4> :set list!<CR>
"https://github.com/scrooloose/syntastic
"plugin para validar sintaxis con syntastic"
let g:syntastic_js_checkers=['jslint', 'eslint']
"https://jaxbot.me/articles/setting-up-vim-for-react-js-jsx-02-03-2015
let g:syntastic_javascript_checkers=['jslint', 'eslint']
"https://github.com/elzr/vim-json
let g:vim_json_syntax_conceal = 0
let g:syntastic_auto_jump = 1
let g:syntastic_json_checkers=['jsonlint']
let g:syntastic_php_checkers=['php', 'phpcs', 'phpmd']
let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]'
"https://github.com/mattn/emmet-vim
"'n' only enable normal mode functions.
"'inv' enable all functions, which is equal too
"'a' enable all function in all mode.
let g:user_emmet_mode='a'
"https://github.com/mxw/vim-jsx"
let g:jsx_ext_required = 0
"https://github.com/jelera/vim-javascript-syntax
"https://github.com/mxw/vim-jsx.git
"https://github.com/teramako/jscomplete-vim
autocmd FileType javascript set omnifunc=nodejscomplete#CompleteJS
"autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
"https://github.com/othree/javascript-libraries-syntax.vim
autocmd BufReadPre *.js let b:javascript_lib_use_jquery = 1
autocmd BufReadPre *.js let b:javascript_lib_use_underscore = 1
autocmd BufReadPre *.js let b:javascript_lib_use_backbone = 0
autocmd BufReadPre *.js let b:javascript_lib_use_prelude = 0
autocmd BufReadPre *.js let b:javascript_lib_use_angularjs = 1
"http://www.vim.org/scripts/script.php?script_id=1945
au! BufRead,BufNewFile *.json set filetype=json
augroup json_autocmd
autocmd!
autocmd FileType json set autoindent
autocmd FileType json set formatoptions=tcq2l
autocmd FileType json set textwidth=78 shiftwidth=2
autocmd FileType json set softtabstop=2 tabstop=8
autocmd FileType json set expandtab
autocmd FileType json set foldmethod=syntax
augroup END
"https://github.com/pangloss/vim-javascript
augroup javascript_folding
au!
au FileType javascript setlocal foldmethod=syntax
augroup END
"Configuracion personal"
set encoding=utf-8
set shiftwidth=2
set expandtab
set ls=2 " allways show status line
set tabstop=2 " numbers of spaces of tab character
set scrolloff=3 " keep 3 lines when scrolling
set ignorecase " Ignorar mayusculas y minusculas
set smartcase " Busqueda con solo las primeras letras
set incsearch " xxx
set foldmethod=indent "Muestra en folders por identacion
set guioptions-=m " Eliminar ventana de windows
set guioptions-=T " Eliminar vantana de vim
color delek
" Indenting
set autoindent
set smartindent
set copyindent
set backupdir=~/.tmpvim/swap "Cambia el directorio de los archivos temporales ~
set directory=~/.tmpvim/backup "Cambia el directorio de los archivos .*.swp
" Use F3 when pasting to avoid applying indents
set pastetoggle=<F3>
" Use multiple of shiftwidth when indenting with '<' and '>'
set shiftround
" Commands to be rememebered
set history=500
" Change terminal title
set title
"Si el texto es muy largo se corta
set wrap
set list lcs=tab:→\ ,eol:¬,nbsp:☃
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
"
" Make sure you use single quotes
"
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
Plug 'elmcast/elm-vim'
" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
"
" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
"
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
"
" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'
" Initialize plugin system
call plug#end()"