Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improved statusline & unified some syntax OCD

  • Loading branch information...
commit 6cc5f41b2b45c7afebd6dc0dc7f499dc593d159f 1 parent dcf1ff5
@hkjels authored
View
10 vim/.vimrc.link
@@ -48,7 +48,7 @@ filetype plugin on
set wildignore+=*.jpg,*.bmp,*.gif,*.png,*.jpeg " binary images
set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest " compiled object files
set wildignore+=*.sw? " Vim swap files
- set wildignore+=*.DS_Store " OSX bullshit
+ set wildignore+=*.DS_Store " MacOs meta-file
set wildignore+=*.luac " Lua byte code
set wildignore+=*.pyc " Python byte code
set wildignore+=**.class " Cursed Java class files
@@ -66,10 +66,11 @@ filetype plugin on
set directory=/tmp/ " swap files
set ffs=unix,dos,mac " default file types
set gdefault " search with global by default
+ set ignorecase " ignore case
set smartcase " ignore case if pattern is lowercase
set incsearch " show search matches as you type
- set history=500 " remember more commands and search history
- set undolevels=500 " use many muchos levels of undo
+ set history=1000 " remember more commands and search history
+ set undolevels=1000 " use many muchos levels of undo
set title " change the terminal's title
set visualbell " no bells!
set noerrorbells " no whistles!
@@ -94,8 +95,9 @@ filetype plugin on
let g:gist_detect_filetype = 2
let g:gist_show_privates = 1
- " NERDTree
+ " ctrlp
let g:ctrlp_dont_split = 'NERD_tree_2'
+ let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git\|target\|components'
" SnipMate
let g:snippets_dir = "~/.vim/bundle/snipmate-snippets"
View
21 vim/aestetics.vim
@@ -30,7 +30,6 @@
endif
set scrolloff=10
- set sidescrolloff=10
set tabstop=2
set shiftwidth=2
set softtabstop=2
@@ -40,7 +39,6 @@
set smarttab
set autoindent
set smartindent
- set cinkeys=0{,0},:,0#,!,!^F
set foldmethod=indent
set foldlevel=99
set splitbelow
@@ -54,6 +52,11 @@
set statusline =
+ set statusline+=%#identifier#
+ set statusline+=%1*
+ set statusline+=%{Branch()}
+ set statusline+=%*
+
" Filename
set statusline+=%#identifier#
@@ -63,20 +66,34 @@
" Flags
set statusline+=%2*
set statusline+=%h%m%r%w
+ set statusline+=%*
" Warning when file encoding is not utf-8
set statusline+=%#warningmsg#
+ set statusline+=%2*
set statusline+=\%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''}
+ set statusline+=%*
" Warning on syntax-error
set statusline+=%#warningmsg#
+ set statusline+=%2*
set statusline+=\%{SyntasticStatuslineFlag()}
+ set statusline+=%*
" Row & column
set statusline+=%*
set statusline+=%=
+ set statusline+=%<
set statusline+=%0*\ row:%l/%L\ \ col:%03c
set statusline+=%*
let g:syntastic_enable_signs = 1
+ fun! Branch()
+ let s:status = fugitive#statusline()
+ if (s:status != '')
+ return strpart(s:status, 4, strlen(s:status) - 5)
+ endif
+ return ''
+ endfun
+
View
24 vim/languages.vim
@@ -1,4 +1,12 @@
+" Some file types should wrap their text
+function! s:setupWrapping()
+ set wrap
+ set linebreak
+ set textwidth=75
+ set nolist
+endfunction
+
"------------------------
" Language configurations
"------------------------
@@ -11,7 +19,7 @@ augroup filetypedetect
au BufNewFile,BufRead *.conf set filetype=apache
" Csv
- au BufNewFile,BufRead *.csv,*.dat set filetype=csv
+ au BufNewFile,BufRead *.{csv,dat,dsv} set filetype=csv
" Coffee-script
au BufNewFile,BufRead *.coffee set filetype=coffee
@@ -19,21 +27,30 @@ augroup filetypedetect
" Haskell
au BufNewFile,BufRead *.hs compiler ghc
+ " Ruby
+ au BufRead,BufNewFile Gemfile, Rakefile, Vagrantfile, Thorfile set filetype=ruby
+ au BufRead,BufNewFile Procfile, Guardfile, config.ru, *.rake set filetype=ruby
+
" Jade
au BufNewFile,BufRead *.jade set filetype=jade
" Markdown
- au BufNewFile,BufRead *.md,*.markdown,*.mdown,*.mkd set filetype=markdown
+ au BufNewFile,BufRead *.{md,markdown,mdown,mkd} set filetype=markdown
" Stylus
au BufNewFile,BufRead *.styl set filetype=stylus
+ " JSON
+ au BufNewFile,BufRead *.json set filetype=javascript
+
augroup END
" Javascript
au FileType javascript set dictionary+=$HOME/.vim/bundle/vim-node/dict/node.dict
+au FileType markdown call s:setupWrapping
+
" Haskell
let g:haddock_browser="open"
let g:haddock_browser_callformat = "%s %s"
@@ -41,6 +58,3 @@ let g:haddock_browser_callformat = "%s %s"
" Html
au FileType html set matchpairs+=<:>
-" Remove trailing whitespace
-au FileType c,cpp,php,js,coffee,styl,jade au BufWritePre <buffer> :%s/\s\+$//e
-
View
12 vim/map.vim
@@ -3,18 +3,22 @@
let mapleader = ","
let g:mapleader = ","
+" Better focus on search matches
+nnoremap n nzzzv
+nnoremap N Nzzzv
+
" Remove highlighted search-query with
nnoremap <CR> :nohlsearch<CR>
nnoremap <silent> <leader>/ :nohlsearch<CR>
-" Sudo like a boss
-cmap w!! w !sudo tee % >/dev/null
-cmap x!! x !sudo tee % >/dev/null
-
" Normalize regular-expression searches
nnoremap / /\v
vnoremap / /\v
+" Sudo like a boss
+cmap w!! w !sudo tee % >/dev/null
+cmap x!! x !sudo tee % >/dev/null
+
" Center screen on alternative navigation
nnoremap n nzz
nnoremap } }zz
Please sign in to comment.
Something went wrong with that request. Please try again.