1+ " Search this file for "important" for the most important lines
2+
13" =============================================================================
24" ====
35" =====
46" ======
5- " Vanilla Vim Settings :
7+ " Setup And Styles And Colors :
68" ======
79" =====
810" ====
@@ -18,16 +20,8 @@ call pathogen#infect()
1820Helptags " Added to avoid having to manually install docs for plugins
1921filetype plugin indent on
2022
21- " Experimental to make command line completion easier?
22- set wildmenu
23-
24- " Don't put two spaces after a period when joining lines with gq or J or
25- " whatever
26- set nojoinspaces
27-
28- " Nerdtree coloring gets messed when you call syntax on/enable more than once.
29- " It overwrites user defined colors. Use `enable` because `on` will overwrite
30- " any defined colors
23+ " The "right" way to set color. Use `enable` because `on` will overwrite all
24+ " other colors. Guard because no reason to call it more than once
3125if ! exists (" g:syntax_on" )
3226 syntax enable
3327endif
@@ -38,17 +32,43 @@ highlight ColorColumn guibg=#331111
3832set colorcolumn = 80
3933set cursorline
4034
41- " Always show vim's tab bar
42- set showtabline = 2
43-
4435" Make the cursor a thin line (not a block) and color it differently in insert
45- " and normal mode. Makes it WAY easier to see where the cursor is
36+ " and normal mode. Makes it WAY easier to see where the cursor is. This is the
37+ " most important thing in this file
4638highlight Cursor guibg= #FF92BB guifg= #ffffff
4739highlight iCursor guibg= red
4840set guicursor = n - c :ver30- Cursor /lCursor,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-iCursor/ lCursor,r - cr :hor20- Cursor /lCursor,v - sm :block- Cursor
4941
50- " Experimental make lines that wrap have same indenting as their parent
51- set breakindent
42+ " Highlight trailing whitespace in vim on non empty lines, but not while
43+ " typing in insert mode. Super useful!
44+ highlight ExtraWhitespace ctermbg= red guibg= Brown
45+ au ColorScheme * highlight ExtraWhitespace guibg= red
46+ au BufEnter * match ExtraWhitespace /\S\zs\s\+$/
47+ au InsertEnter * match ExtraWhitespace /\S\zs\s\+\%#\@<!$/
48+ au InsertLeave * match ExtraWhiteSpace /\S\zs\s\+$/
49+
50+ " Always show vim's tab bar
51+ set showtabline = 2
52+
53+ " =============================================================================
54+ " ====
55+ " =====
56+ " ======
57+ " Vanilla Vim Settings:
58+ " ======
59+ " =====
60+ " ====
61+ " ===
62+ " =============================================================================
63+
64+ " Make all searches very magic. This is the most important thing in this file.
65+ " Also mark the position before you start searching to copy text back to
66+ nnoremap / ms/\v
67+ nnoremap ? ms?\v
68+
69+ " Don't put two spaces after a period when joining lines with gq or J or
70+ " whatever
71+ set nojoinspaces
5272
5373" Don't try to highlight lines longer than 800 characters.
5474set synmaxcol = 800
@@ -58,11 +78,6 @@ set splitright
5878" This makes :help open at the bottom, which I don't like, so removing for now
5979" set splitbelow
6080
61- " Make all searches very magic. This is the most important thing in this file.
62- " Also mark the position before you start searching to copy text back to
63- nnoremap / ms/\v
64- nnoremap ? ms?\v
65-
6681" Custom file type syntax highlighting
6782au BufRead ,BufNewFile .aprc set ft = ruby syntax = ruby
6883au BufRead ,BufNewFile .pryrc set ft = ruby syntax = ruby
@@ -124,28 +139,15 @@ set incsearch
124139" r = Always show scrollbar
125140set guioptions = mer
126141
127- " Maybe I should remove these? Annoying when I'm in a 2 space project and have
128- " to manually set
129- set tabstop = 4
130- set shiftwidth = 4
131- set smarttab
132-
133142" Use spaces always
134143set expandtab
135144
136- " Disable C-style indenting. Experimental
137- set nocindent
138-
139145" Copy indent from current line when starting a new line
140146set autoindent
141147
142148" Break at specific characters when wrapping long lines (:set breakat?)
143149set lbr
144150
145- " Set bottom indicator. Probably does nothing with vim-powerline
146- set ruler
147- set showcmd
148-
149151" Give one virtual space at end of line so the cursor can go to the end of the
150152" line (useful)
151153set virtualedit = onemore
@@ -159,10 +161,7 @@ set iskeyword=@,48-57,_,192-255,#,$
159161" Backspace in normal mode: Act like normal backspace and go into insert mode
160162nnoremap <bs> i<bs>
161163
162- " Why do I have this?
163- set path = .,/usr/ include ,$PWD
164-
165- " More commands in q: q/ etc
164+ " More commands in q: q/ etc (default is 50)
166165set history = 200
167166
168167" VIM LITERALLY CAN'T INDENT HTML AND THERE'S NO HELP FOR THIS VARIABLE NAME
@@ -177,14 +176,6 @@ let g:html_indent_autotags = "html"
177176" indenting... come on Vim
178177" call HtmlIndent_CheckUserSettings()
179178
180- " Highlight trailing whitespace in vim on non empty lines, but not while
181- " typing in insert mode. Super useful!
182- highlight ExtraWhitespace ctermbg= red guibg= Brown
183- au ColorScheme * highlight ExtraWhitespace guibg= red
184- au BufEnter * match ExtraWhitespace /\S\zs\s\+$/
185- au InsertEnter * match ExtraWhitespace /\S\zs\s\+\%#\@<!$/
186- au InsertLeave * match ExtraWhiteSpace /\S\zs\s\+$/
187-
188179" Jump to last known cursor position when opening file
189180" warning: This appears to break jump-to-line when opening a file with CtrlP
190181autocmd BufReadPost *
@@ -201,6 +192,30 @@ au BufNewFile,BufRead COMMIT_EDITMSG setlocal spell | DiffGitCached
201192" editing a git commit message, which has split of msg/code change
202193" au VimResized * :wincmd =
203194
195+ " Some experimental stuff
196+
197+ " Experimental to make command line completion easier?
198+ set wildmenu
199+
200+ " Experimental make lines that wrap have same indenting as their parent
201+ set breakindent
202+
203+ " Maybe I should remove these? Annoying when I'm in a 2 space project and have
204+ " to manually set
205+ set tabstop = 4
206+ set shiftwidth = 4
207+ set smarttab
208+
209+ " Disable C-style indenting. Experimental
210+ set nocindent
211+
212+ " Set bottom indicator. Probably does nothing with vim-powerline
213+ set ruler
214+ set showcmd
215+
216+ " Why do I have this?
217+ set path = .,/usr/ include ,$PWD
218+
204219
205220" =============================================================================
206221" ====
@@ -292,7 +307,8 @@ vnoremap <silent> <Leader>t. :t'.<cr>
292307nnoremap <silent> <Leader> t; :'.t.<cr>
293308vnoremap <silent> <Leader> t; :'.t.<cr>
294309
295- " Make Y yank till end of line. Super useful
310+ " Make Y yank till end of line. Super useful. This is the most important thing
311+ " in this file
296312nnoremap Y y$
297313
298314" In command line mode use ctrl-direction to move instead of arrow keys. Super
0 commit comments