Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
dotvim/vimrc at master · jesvs/dotvim · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
jesvs
dotvim
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
dotvim
/
vimrc
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
276 lines (239 loc) · 7.57 KB
master
Breadcrumbs
dotvim
/
vimrc
Copy path
Top
File metadata and controls
Code
Blame
276 lines (239 loc) · 7.57 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
"
This must be first, becuase it changes other options as side effect
set
nocompatible
set
laststatus
=
2
set
encoding
=
utf
-
8
set
rtp
+=
~/.vim/bundle/vundle
call
vundle#rc
()
"
let Vundle manage Vundle
"
required!
Bundle
'
gmarik/vundle
'
"
tools
Bundle
'
Valloric/YouCompleteMe
'
Bundle
'
scrooloose/syntastic
'
Bundle
'
UltiSnips
'
Bundle
'
goldfeld/vim-seek
'
Bundle
'
jiangmiao/auto-pairs
'
Bundle
'
kien/ctrlp.vim
'
Bundle
'
Align
'
Bundle
'
Lokaltog/vim-powerline
'
Bundle
'
godlygeek/tabular
'
Bundle
'
toggle_words.vim
'
Bundle
'
tpope/vim-surround
'
Bundle
'
tpope/vim-fugitive
'
"
templating
"
Bundle 'cakebaker/scss-syntax.vim'
Bundle
'
tpope/vim-haml
'
Bundle
'
digitaltoad/vim-jade
'
Bundle
'
groenewege/vim-less
'
Bundle
'
slim-template/vim-slim
'
"
javascript
Bundle
'
pangloss/vim-javascript
'
"
Bundle 'othree/javascript-libraries-syntax.vim'
Bundle
'
guileen/vim-node
'
Bundle
'
marijnh/tern_for_vim
'
"
Bundle 'myhere/vim-nodejs-complete'
"
theme
Bundle
'
nanotech/jellybeans.vim
'
"
autocmd CursorMovedI * if pumvisible() == 0|silent! pclose|endif
"
autocmd InsertLeave * if pumvisible() == 0|silent! pclose|endif
let
g:
ycm_autoclose_preview_window_after_completion
=
1
let
g:
ycm_autoclose_preview_window_after_insertion
=
1
"
let g:ycm_key_list_select_completion=['<C-TAB>','<Down>']
"
let g:ycm_key_list_previous_completion=['<C-S-TAB>','<Up>']
"
let g:SuperTabDefaultCompletionType='<C-Tab>'
let
g:
UltiSnipsExpandTrigger
=
'
<C-SPACE>
'
let
g:
ctrlp_map
=
'
<c-p>
'
let
g:
Powerline_symbols
=
'
fancy
'
"
let g:used_javascript_libs='jquery'
"
let g:nodejs_complete_config={'js_compl_fn': 'jscomplete#CompleteJS','max_node_compl_len':15}
let
mapleader
=
"
,
"
filetype
off
set
t_Co
=
256
let
coffee_compile_on_save
=
0
"
theme
set
background
=
dark
if
&
t_Co
>
2
||
has
(
"
gui_running
"
)
syntax
on
set
hlsearch
colorscheme
jellybeans
endif
if
has
(
"
gui_gtk2
"
)
set
guifont
=
Menlo
\
for
\
Powerline
\
12
elseif
has
(
"
gui_macvim
"
)
set
guifont
=
Menlo
\
for
\
Powerline
\
12
elseif
has
(
"
gui_win32
"
)
set
guifont
=
Menlo
\
for
\
Powerline:h12
end
"
set backspace=indent,eol,start
set
backspace
=
2
"
ident,eol,start
set
copyindent
"
copy the previous indentation on autoindenting
set
formatprg
=
par
set
hidden
"
hides buffers instead of closing them
set
history
=
1000
set
fileformats
=
unix,dos,mac
set
iskeyword
+=
_,
$
,
@
,
%
,#,
-
"
none of these should be word dividers
set
ignorecase
"
ignore case when searching
set
incsearch
"
interactive search
set
linebreak
set
nolist
set
nobackup
set
noswapfile
set
nowrap
set
number
"
always show line numbers
set
pastetoggle
=
<F2>
set
ruler
"
always display the current cursor position
set
showcmd
"
displays incomplete command
set
showmatch
"
show matching parenthesis
set
matchtime
=
5
set
smartcase
"
ignore case when pattern is all lowercase
set
smartindent
set
spelllang
=
es
"
indenting
set
tabstop
=
2
set
softtabstop
=
2
set
shiftwidth
=
2
set
noexpandtab
set
smarttab
"
insert tabs on the start of a line, spaces everyewhere else
set
cindent
"
folding
set
foldenable
set
foldmethod
=
indent
set
foldlevel
=
100
set
foldopen
-=
search
set
foldopen
-=
undo
set
title
set
undolevels
=
1000
set
noerrorbells
"
set cmdheight=1
"
set visualbell
set
wildignore
=
*
.swp,
*
.bak,
*
.pyc,
*
.
class
,
*
.db,.git,.svn
"
do not redraw while running macros (much faster) (LazyRedraw)
set
lazyredraw
"
number of pixel lines inserted between characters
set
linespace
=
0
"
command-line completion operates in an enhanced mode
set
wildmenu
"
allow backspace and cursor keys to cross line boundaries
set
whichwrap
+=
<,>
,
h
,
l
"
shortens messages to avoid 'press a key' prompt
set
shortmess
=
atI
"
tell us when any line is changed via : commands
set
report
=
0
"
make the splitters between windows be blank
"
messes powerline
"
set fillchars=vert:\ ,stl:\ ,stlnc:\
"
Minimal number of screen lines to keep above and below the cursor
set
scrolloff
=
8
"
tab switching with arrows
map
<c-right>
<ESC>
gt
<RETURN>
map
<c-left>
<ESC>
gT
<RETURN>
map
<right>
<ESC>
:bnext
<RETURN>
map
<left>
<ESC>
:bprevious
<RETURN>
"
nnoremap <up> <nop>
"
nnoremap <down> <nop>
"
nnoremap <left> <nop>
"
nnoremap <right> <nop>
"
inoremap <up> <nop>
"
inoremap <down> <nop>
"
inoremap <left> <nop>
"
inoremap <right> <nop>
noremap
<C-H>
<C-W>
h
noremap
<C-L>
<C-W>
l
noremap
<C-J>
<C-W>
j
noremap
<C-K>
<C-W>
k
nmap
<CR>
:write
<CR>
nnoremap
;
:
cmap
w!!
w !sudo tee % > /dev/null
<CR>
cmap
wc
w !haml % ${'%'/haml/html}
<CR>
nmap
<silent>
<leader>
tw
:ToggleWord
<CR>
nmap
<silent>
<leader>
ev
:tabedit $MYVIMRC
<CR>
nmap
<silent>
,/
:nohlsearch
<CR>
nmap
<silent>
<leader>
==
:Tabularize/=/
function
!
HamlCompile
()
let
cmdtype
=
getcmdtype
()
if
cmdtype
==
'
:
'
"
compile haml and save it as html
w
!
haml
%
test.html
endif
endfunction
if
has
(
'
mouse
'
)
set
mouse
=
a
endif
if
has
(
"
autocmd
"
)
"
Enable file type detection.
"
Use the default filetype settings, so that mail gets 'tw' set to 72,
"
'cindent' is on in C files, etc.
"
Also load indent files, to automatically do language-dependent indenting.
filetype
plugin
indent
on
"
Put these in an autocmd group, so that we can delete them easily.
augroup
vimrcEx
au
!
"
For all text files set 'textwidth' to 78 characters.
autocmd
FileType
text
setlocal
textwidth
=
78
"
autocmd FileType python set expandtab
"
autocmd FileType html,xml set listchars-=tab:››
autocmd
FileType
haml,scss,sass
setlocal
noexpandtab
"
list
"
autocmd FileType fstab setlocal noexpandtab list listchars=tab:››
autocmd
BufRead
*_spec.rb
syn
keyword
rubyRspec describe context it specify it_should_behave_like before after setup subject
autocmd
BufReadPost
Gemfile,.autotest,config.ru
setlocal
syntax
=
ruby
"
autocmd BufReadPost .autotest setlocal syntax=ruby
highlight
def
link
rubyRspec
Function
"
When editing a file, always jump to the last known cursor position.
"
Don't do it when the position is invalid or when inside an event handler
"
(happens when dropping a file on gvim).
"
Also don't do it when the mark is in the first line, that is the default
"
position when opening a file.
autocmd
BufReadPost
*
\
if
line
(
"
'
\"
"
)
>
1
&&
line
(
"
'
\"
"
)
<=
line
(
"
$
"
) |
\
exe
"
normal! g`
\"
"
|
\
endif
"
messes with powerline
"
autocmd bufwritepost .vimrc source $MYVIMRC
augroup
END
else
set
autoindent
"
always set autoindenting on
endif
"
has(
"
autocmd
"
)
"
zen coding options
let
g:
user_zen_settings
=
{
\
'
indentation
'
:
'
'
,
\
'
perl
'
: {
\
'
aliases
'
: {
\
'
req
'
:
'
require
'
\
},
\
'
snippets
'
: {
\
'
use
'
:
"
use strict
\n
use warnings
\n\n
"
,
\
'
warn
'
:
"
warn
\"
|
\"
;
"
,
\
}
\
}
\}
let
g:
user_zen_expandabbr_key
=
'
<C-o>
'
let
g:
use_zen_complete_tag
=
1
"
Show syntax highlighting groups for word under cursor
nmap
<C-S-P>
:call
<SID>
SynStack()
<CR>
function
!
<SID>
SynStack
()
if
!
exists
(
"
*synstack
"
)
return
endif
echo
map
(
synstack
(
line
(
'
.
'
),
col
(
'
.
'
)),
'
synIDattr(v:val, "name")
'
)
endfunc
au
FileType
javascript
set
dictionary
+=
$HOME
/.vim/
bundle
/vim-node/
dict
/node.
dict
au
BufWritePost
*.haml
call
HamlMake
()
"
Inspired by Mark Hansen's python dependent function
"
http://markhansen.co.nz/autocompiling-haml/
"
Create an empty .autohaml to auto compile your haml files on save
function
!
HamlMake
()
if
filereadable
(
expand
(
'
%:p:h
'
).
"
/.autohaml
"
)
let
hamlinput
=
expand
(
'
%:p
'
)
let
htmloutput
=
substitute
(hamlinput,
"
.haml
"
,
"
.html
"
,
"
"
)
execute
'
silent !haml %
'
.htmloutput
endif
endfunction
au
BufWritePost
*.scss
call
ScssMake
()
function
!
ScssMake
()
if
filereadable
(
expand
(
'
%:p:h
'
).
"
/.autoscss
"
)
let
scssinput
=
expand
(
'
%:p
'
)
let
cssoutput
=
substitute
(scssinput,
"
.scss
"
,
"
.css
"
,
"
"
)
execute
'
silent !scss %
'
.cssoutput
endif
endfunction
You can’t perform that action at this time.