2013-05-12 17:39:10 +00:00
|
|
|
" nocompatible mode for a real vim
|
|
|
|
set nocompatible
|
|
|
|
|
|
|
|
" switch filetype of before starting vundle
|
|
|
|
filetype off
|
|
|
|
|
|
|
|
set rtp+=~/.vim/bundle/vundle/
|
|
|
|
call vundle#rc()
|
|
|
|
|
|
|
|
" load the vundle bundle of course
|
|
|
|
Bundle 'gmarik/vundle'
|
|
|
|
|
|
|
|
|
|
|
|
" plugins
|
|
|
|
Bundle 'Lokaltog/vim-easymotion'
|
|
|
|
Bundle 'Raimondi/delimitMate'
|
|
|
|
Bundle 'SirVer/ultisnips'
|
2013-07-16 21:54:40 +00:00
|
|
|
Bundle 'bling/vim-airline'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'chrisbra/NrrwRgn'
|
|
|
|
Bundle 'editorconfig/editorconfig-vim'
|
|
|
|
Bundle 'edsono/vim-matchit'
|
2013-06-06 09:32:02 +00:00
|
|
|
Bundle 'ervandew/supertab'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'godlygeek/tabular'
|
|
|
|
Bundle 'kien/ctrlp.vim'
|
|
|
|
Bundle 'mattn/gist-vim'
|
|
|
|
Bundle 'mattn/webapi-vim'
|
|
|
|
Bundle 'rking/ag.vim'
|
|
|
|
Bundle 'scrooloose/nerdtree'
|
|
|
|
Bundle 'scrooloose/syntastic'
|
2013-07-16 21:54:40 +00:00
|
|
|
Bundle 'terryma/vim-expand-region'
|
|
|
|
Bundle 'terryma/vim-multiple-cursors'
|
2013-05-12 19:31:07 +00:00
|
|
|
Bundle 'tomtom/tcomment_vim'
|
|
|
|
Bundle 'tpope/vim-abolish'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'tpope/vim-fugitive'
|
|
|
|
Bundle 'tpope/vim-markdown'
|
|
|
|
Bundle 'tpope/vim-ragtag'
|
|
|
|
Bundle 'tpope/vim-repeat'
|
|
|
|
Bundle 'tpope/vim-surround'
|
|
|
|
Bundle 'tpope/vim-unimpaired'
|
|
|
|
|
|
|
|
|
|
|
|
" Additional syntaxes
|
2013-06-06 09:41:56 +00:00
|
|
|
Bundle '2072/PHP-Indenting-for-VIm'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'hail2u/vim-css3-syntax'
|
|
|
|
Bundle 'juvenn/mustache.vim'
|
|
|
|
Bundle 'othree/html5.vim'
|
|
|
|
Bundle 'pangloss/vim-javascript'
|
|
|
|
Bundle 'tpope/vim-git'
|
|
|
|
Bundle 'tpope/vim-haml'
|
|
|
|
Bundle 'webgefrickel/vim-typoscript'
|
|
|
|
|
|
|
|
|
|
|
|
" Color themes
|
2013-05-14 17:32:05 +00:00
|
|
|
Bundle 'altercation/vim-colors-solarized'
|
2013-05-12 17:39:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
" and reset auto-filetype after loading all bundles
|
|
|
|
filetype plugin indent on
|
|
|
|
syntax on
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
set ruler " show where you are in the document
|
|
|
|
set cursorline " highligh current line
|
|
|
|
set ttyfast " faster terminal usage
|
|
|
|
set showcmd " show me what im doing. helps alot
|
|
|
|
set showmode " show active mode
|
|
|
|
set hidden " allows for switching buffers without writing
|
|
|
|
set relativenumber " relative line numbers are mothereffin awesome -- see how far your commands will go
|
|
|
|
|
|
|
|
set nowrap " dont wrap lines around
|
|
|
|
set sidescroll=10 " smoother side-scrolling
|
|
|
|
set sidescrolloff=5
|
|
|
|
|
|
|
|
" nice Whitespace chars
|
|
|
|
set list!
|
|
|
|
set listchars=extends:»,precedes:«,tab:▸\ ,eol:¬,trail:·
|
|
|
|
|
2013-06-06 09:41:56 +00:00
|
|
|
" add the dash to keywords -- makes better css/js/html search
|
|
|
|
" dot this for specific files only (not in php/rb e.g.)
|
|
|
|
au BufNewFile,BufRead *.{json,js,css,scss,html} set iskeyword+=-
|
|
|
|
au BufNewFile,BufRead *.{json,js,css,scss,html} set iskeyword-=_
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" Tabs and Whitespace
|
|
|
|
set tabstop=2
|
|
|
|
set softtabstop=2
|
|
|
|
set shiftwidth=2
|
|
|
|
set shiftround
|
|
|
|
set smarttab
|
|
|
|
set expandtab
|
|
|
|
set autoindent
|
|
|
|
|
2012-09-19 21:24:12 +00:00
|
|
|
" use the mouse for scrolling, yeah
|
|
|
|
set mouse=a
|
|
|
|
|
|
|
|
" gui options
|
|
|
|
if has('gui_running')
|
2012-09-22 13:23:04 +00:00
|
|
|
set guifont=Menlo\ for\ Powerline:h12 " a nice font here
|
|
|
|
set linespace=1 " menlo is nice, but very dense...
|
|
|
|
set guioptions-=T " no toolbar
|
|
|
|
set guioptions-=L " no left scrollbar
|
|
|
|
set guioptions-=r " no right scrollbar
|
|
|
|
endif
|
|
|
|
|
|
|
|
" mac terminal-vim play nicely with tmux
|
|
|
|
if &term =~ '^screen'
|
|
|
|
" tmux will send xterm-style keys when its xterm-keys option is on
|
|
|
|
execute "set <xUp>=\e[1;*A"
|
|
|
|
execute "set <xDown>=\e[1;*B"
|
|
|
|
execute "set <xRight>=\e[1;*C"
|
|
|
|
execute "set <xLeft>=\e[1;*D"
|
|
|
|
" map <Esc>[B <Down>
|
2012-09-19 21:24:12 +00:00
|
|
|
endif
|
|
|
|
|
2013-05-14 17:32:05 +00:00
|
|
|
|
2013-06-06 09:32:02 +00:00
|
|
|
let g:solarized_contrast = 'high'
|
2013-05-14 17:32:05 +00:00
|
|
|
set background=dark
|
|
|
|
colorscheme solarized
|
2013-05-12 17:39:10 +00:00
|
|
|
|
2012-11-29 14:56:52 +00:00
|
|
|
set fillchars=""
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" Automatically read a file that has changed on disk
|
|
|
|
set autoread
|
|
|
|
|
|
|
|
set encoding=utf-8 " Yeah. UTF-8 FTW!
|
|
|
|
set fileformat=unix
|
|
|
|
|
|
|
|
set virtualedit=all " every mode active from v V to StrgV
|
|
|
|
|
|
|
|
" always put a status line in and make the command line 2 lines high
|
|
|
|
set laststatus=2
|
|
|
|
set ch=2
|
|
|
|
|
|
|
|
" Add a $ to the end of a selection vor easier overwriting vizualisation
|
|
|
|
set cpoptions+=$
|
|
|
|
|
|
|
|
" Searching
|
|
|
|
set ignorecase
|
|
|
|
set smartcase
|
|
|
|
set gdefault
|
|
|
|
set incsearch
|
|
|
|
set showmatch
|
|
|
|
set hlsearch
|
|
|
|
set wrapscan " set the search scan to wrap lines
|
|
|
|
set backspace=indent,eol,start " Allow backspacing over everything in insert mode
|
|
|
|
|
|
|
|
" Tab completion, and ignore some filetypes
|
|
|
|
set wildmode=list:longest,list:full
|
|
|
|
set wildignore+=.git,.svn,*.swp,*.bak,*.tmp,*.old
|
|
|
|
set wildmenu
|
|
|
|
|
|
|
|
set nobackup " no backups
|
|
|
|
set nowritebackup
|
|
|
|
set noswapfile " no swp-files
|
|
|
|
|
|
|
|
" Better folding
|
2013-07-05 16:49:04 +00:00
|
|
|
" TODO rework this and start using folds
|
2012-05-28 14:38:01 +00:00
|
|
|
set foldmethod=indent
|
2013-07-05 16:49:04 +00:00
|
|
|
setlocal foldignore=
|
2012-05-28 14:38:01 +00:00
|
|
|
set foldnestmax=20 " max 20 levels of folding
|
|
|
|
set nofoldenable " dont fold by default - let me do it
|
|
|
|
set foldlevelstart=1 " deactivate folding on fileload
|
|
|
|
|
|
|
|
set noerrorbells " don't beep
|
|
|
|
set visualbell " don't beep
|
|
|
|
|
|
|
|
|
|
|
|
" ========== Custom Keymappings ==========
|
2013-07-05 16:49:04 +00:00
|
|
|
|
|
|
|
" Typos
|
|
|
|
command! -bang E e<bang>
|
|
|
|
command! -bang Q q<bang>
|
|
|
|
command! -bang W w<bang>
|
|
|
|
command! -bang QA qa<bang>
|
|
|
|
command! -bang Qa qa<bang>
|
|
|
|
command! -bang Wa wa<bang>
|
|
|
|
command! -bang WA wa<bang>
|
|
|
|
command! -bang Wq wq<bang>
|
|
|
|
command! -bang WQ wq<bang>
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" set the leader to comma , and ; == : -- faster commands
|
|
|
|
let mapleader = ","
|
|
|
|
nnoremap ; :
|
|
|
|
|
|
|
|
" jk nice behaviour (screen lines vs. shown lines)
|
|
|
|
nnoremap j gj
|
|
|
|
nnoremap k gk
|
|
|
|
|
2013-02-22 18:43:07 +00:00
|
|
|
" behave - yank just like D and C
|
|
|
|
nnoremap Y y$
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
nnoremap / /\v
|
|
|
|
vnoremap / /\v
|
|
|
|
|
2012-11-27 22:41:10 +00:00
|
|
|
inoremap jj <Esc>
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" Switch between windows
|
|
|
|
nnoremap <tab> <C-w><C-w>
|
|
|
|
nnoremap <S-tab> <C-w>W
|
|
|
|
|
|
|
|
" Search mappings: These will make it so that going to the next one in a
|
|
|
|
" search will center on the line it's found in.
|
|
|
|
nnoremap N Nzz
|
|
|
|
nnoremap n nzz
|
|
|
|
|
|
|
|
" Adjust viewports to the same size
|
2012-05-30 18:23:20 +00:00
|
|
|
nnoremap <leader>= <C-w>=
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" reset search
|
2012-05-30 18:23:20 +00:00
|
|
|
nnoremap <leader><space> :noh<cr>
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" open new vertical split and change to split
|
2013-02-22 18:43:07 +00:00
|
|
|
nnoremap <leader>\ <C-w>v<C-w>l
|
|
|
|
nnoremap <leader>- <C-w>s<C-w>j
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-05-16 15:23:35 +00:00
|
|
|
" open a new split and edit the vimrc // easy sourcing vimrc
|
2013-05-14 17:32:05 +00:00
|
|
|
nnoremap <leader>v <C-w>v<C-w>l :e ~/.vimrc<cr>
|
2013-05-16 15:23:35 +00:00
|
|
|
nnoremap <leader>s :source ~/.vimrc<cr>
|
2013-05-14 17:32:05 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" Opens an edit command with the path of the currently edited file filled in
|
2012-05-30 18:23:20 +00:00
|
|
|
nnoremap <leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
|
|
|
|
|
2013-07-05 16:49:04 +00:00
|
|
|
" start a new document-wide seach-replace using abolish or normal search
|
|
|
|
nnoremap <leader>f :%s/
|
|
|
|
nnoremap <leader>F :%S/
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-05-12 19:31:07 +00:00
|
|
|
" dont use the arrow keys in insert mode
|
2012-05-28 14:38:01 +00:00
|
|
|
inoremap <up> <nop>
|
|
|
|
inoremap <down> <nop>
|
|
|
|
inoremap <left> <nop>
|
|
|
|
inoremap <right> <nop>
|
|
|
|
|
2013-05-12 19:31:07 +00:00
|
|
|
" but use them for usefull stuff in normal mode-- switching buffers
|
|
|
|
nnoremap <up> :bfirst<cr>
|
|
|
|
nnoremap <down> :blast<cr>
|
2012-05-28 14:38:01 +00:00
|
|
|
nnoremap <left> :bp<cr>
|
|
|
|
nnoremap <right> :bn<cr>
|
|
|
|
|
|
|
|
" Bubble lines using unimpaired
|
|
|
|
nmap <C-up> [e
|
|
|
|
nmap <C-down> ]e
|
|
|
|
vmap <C-up> [egv
|
|
|
|
vmap <C-down> ]egv
|
|
|
|
|
|
|
|
" in/outdent Keymappings
|
|
|
|
nmap <C-left> <<
|
|
|
|
nmap <C-right> >>
|
|
|
|
vmap <C-left> <gv
|
|
|
|
vmap <C-right> >gv
|
|
|
|
|
2013-05-12 19:31:07 +00:00
|
|
|
" pasting and copying
|
2012-11-21 13:55:47 +00:00
|
|
|
set pastetoggle=<F2> " toggle paste-mode for c&p with F2
|
2013-05-12 19:31:07 +00:00
|
|
|
set clipboard=unnamed
|
|
|
|
|
2012-10-09 17:05:32 +00:00
|
|
|
" Yank text to the OS X clipboard
|
|
|
|
noremap <leader>y "*y
|
|
|
|
noremap <leader>Y "*Y
|
2012-11-21 13:55:47 +00:00
|
|
|
" paste keeping indentation
|
|
|
|
nnoremap <leader>p p`[v`]=
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-05-12 19:31:07 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" no HELP while mishitting ESC - awesome
|
|
|
|
inoremap <F1> <ESC>
|
|
|
|
nnoremap <F1> <ESC>
|
|
|
|
vnoremap <F1> <ESC>
|
2013-05-12 19:31:07 +00:00
|
|
|
" deactivate stupid ex-mode and man-page stuff
|
2012-08-06 21:07:34 +00:00
|
|
|
nnoremap Q <nop>
|
|
|
|
nnoremap K <nop>
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" upper/lower word
|
2013-06-06 09:32:02 +00:00
|
|
|
nmap <leader>u mQviwU`Q
|
|
|
|
nmap <leader>l mQviwu`Q
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" Swap two words
|
|
|
|
nmap <leader>w :s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/<CR>`'
|
|
|
|
|
2012-09-19 21:24:12 +00:00
|
|
|
" change working directory to current file
|
|
|
|
nnoremap <leader>d :cd %:p:h<CR>:pwd<CR>
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2012-12-03 12:46:43 +00:00
|
|
|
" reload files when set autoread is active with F5
|
2013-07-05 16:49:04 +00:00
|
|
|
" TODO make this awesome reloading NERDtree + ctrl+p as well
|
2012-12-03 12:46:43 +00:00
|
|
|
nnoremap <F5> :checktime<cr>
|
|
|
|
|
2013-07-05 16:49:04 +00:00
|
|
|
" folding shortcuts
|
|
|
|
nnoremap <space> za
|
|
|
|
|
|
|
|
|
|
|
|
" when over a class in html hit fc to find that class in css/scss/js
|
|
|
|
nnoremap <leader>c :execute "vimgrep /" . expand("<cword>") . "/j **" <Bar> cnext<CR>
|
|
|
|
|
2012-12-03 12:46:43 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" ========== PLugins leaders and other config ==========
|
2013-05-12 19:31:07 +00:00
|
|
|
" search using Ag - the Silver Surfer ftw!
|
2013-05-14 17:32:05 +00:00
|
|
|
nnoremap <leader>a :Ag
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" Nerdtree toggle
|
|
|
|
nnoremap <leader>n :NERDTreeToggle<cr>
|
2012-05-29 16:29:51 +00:00
|
|
|
let NERDTreeMinimalUI=1
|
2012-05-28 14:38:01 +00:00
|
|
|
let NERDTreeWinSize=50
|
2012-05-29 16:29:51 +00:00
|
|
|
let NERDTreeShowHidden=1
|
|
|
|
|
2012-09-14 16:20:22 +00:00
|
|
|
" fugitive shortcuts -- 20+ increases window-height
|
2013-05-14 17:32:05 +00:00
|
|
|
nnoremap <silent> <leader>gs :Gstatus<CR><C-w>20+
|
|
|
|
nnoremap <silent> <leader>gd :Gdiff<CR><C-w>20+
|
|
|
|
nnoremap <silent> <leader>gc :Gcommit<CR><C-w>20+
|
|
|
|
nnoremap <silent> <leader>gb :Gblame<CR><C-w>20+
|
|
|
|
nnoremap <silent> <leader>gl :Glog<CR><C-w>20+
|
|
|
|
nnoremap <silent> <leader>gp :Git push<CR><C-w>20+
|
|
|
|
nnoremap <silent> <leader>gw :Gwrite<CR><C-w>20+
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" TComment
|
|
|
|
nnoremap <leader>/ :TComment<CR>
|
|
|
|
vnoremap <leader>/ :TComment<CR>
|
2013-07-05 16:49:04 +00:00
|
|
|
inoremap <leader>/ <Esc>:TComment<CR>
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-06-06 09:32:02 +00:00
|
|
|
" Tabularize a == think align
|
2013-05-14 17:32:05 +00:00
|
|
|
nmap <Leader>a= :Tabularize /=<CR>
|
|
|
|
vmap <Leader>a= :Tabularize /=<CR>
|
2013-07-16 20:50:16 +00:00
|
|
|
nmap <Leader>a{ :Tabularize /{<CR>
|
|
|
|
vmap <Leader>a{ :Tabularize /{<CR>
|
2013-05-14 17:32:05 +00:00
|
|
|
nmap <Leader>a: :Tabularize /:<CR>
|
|
|
|
vmap <Leader>a: :Tabularize /:<CR>
|
|
|
|
nmap <Leader>a, :Tabularize /,<CR>
|
|
|
|
vmap <Leader>a, :Tabularize /,<CR>
|
|
|
|
nmap <Leader>a<Bar> :Tabularize /<Bar><CR>
|
|
|
|
vmap <Leader>a<Bar> :Tabularize /<Bar><CR>
|
|
|
|
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" easymotion config leader m
|
2012-05-30 18:23:20 +00:00
|
|
|
let g:EasyMotion_leader_key = '<leader>m'
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-06-08 14:23:19 +00:00
|
|
|
" ultisnips in custom dir
|
2013-05-13 19:51:07 +00:00
|
|
|
let g:UltiSnipsSnippetDirectories=["snippets"]
|
|
|
|
|
2013-05-12 19:31:07 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" Enable syntastic syntax checking
|
|
|
|
" no checking for xhtml/html -- because of fluidtemplate for TYPO3
|
|
|
|
" and no checking for scss.css because of CSS3 and SASS-Variable
|
|
|
|
" errors for included files - let codekit handle this
|
|
|
|
let g:syntastic_auto_jump=0
|
|
|
|
let g:syntastic_mode_map = { 'mode': 'active',
|
|
|
|
\ 'active_filetypes': ['ruby', 'php', 'javascript'],
|
|
|
|
\ 'passive_filetypes': ['xhtml', 'html', 'scss', 'scss.css'] }
|
|
|
|
|
|
|
|
" CtrlP
|
2013-07-05 16:49:04 +00:00
|
|
|
nnoremap <leader>b :CtrlPBuffer<cr>
|
|
|
|
nnoremap <leader>r :CtrlPMRU<cr>
|
2012-05-30 18:23:20 +00:00
|
|
|
let g:ctrlp_map = '<leader>t'
|
2012-11-21 13:55:47 +00:00
|
|
|
let g:ctrlp_switch_buffer = 0 " easier split screens
|
2013-07-05 16:49:04 +00:00
|
|
|
let g:ctrlp_working_path_mode = 0 " dont try to change my working directory
|
2012-05-28 14:38:01 +00:00
|
|
|
let g:ctrlp_max_height = 12
|
2012-11-13 18:28:59 +00:00
|
|
|
let g:ctrlp_custom_ignore = { 'dir': '\v[\/](\.git|\.hg|\.svn|node_modules|\.sass-cache)$',
|
2012-09-19 21:24:12 +00:00
|
|
|
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.psd$\|\.png$\|\.jpg$\|\.gif$',
|
|
|
|
\ }
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2012-06-20 17:15:15 +00:00
|
|
|
" Gist filetype-detection
|
|
|
|
let g:gist_detect_filetype = 1
|
|
|
|
|
2013-07-16 21:54:40 +00:00
|
|
|
|
|
|
|
" airline config
|
|
|
|
|
|
|
|
let g:airline_theme='solarized'
|
|
|
|
let g:airline_left_sep='▶'
|
|
|
|
let g:airline_right_sep='◀'
|
|
|
|
set ttimeoutlen=50
|
|
|
|
|
2012-09-19 21:24:12 +00:00
|
|
|
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" ========== Custom Pseudofunctions ==========
|
2013-05-12 19:31:07 +00:00
|
|
|
" JSON syntax highlighting
|
2012-05-28 14:38:01 +00:00
|
|
|
au BufNewFile,BufRead *.json set ft=javascript
|
2013-05-12 19:31:07 +00:00
|
|
|
" Phakefiles syntax is php
|
2012-09-19 21:24:12 +00:00
|
|
|
au BufNewFile,BufRead Phakefile set ft=php
|
2013-05-12 19:31:07 +00:00
|
|
|
" SCSS is scss and css
|
|
|
|
au BufNewFile,BufRead *.scss set ft=scss.css
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" Remember last location in file
|
|
|
|
if has("autocmd")
|
|
|
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
|
|
|
\| exe "normal g'\"" | endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
" ========== On Save ==========
|
|
|
|
" A function for stripping Whitespace when saving
|
|
|
|
function! <SID>StripTrailingWhitespaces()
|
|
|
|
" Preparation: save last search, and cursor position.
|
|
|
|
let _s=@/
|
|
|
|
let l = line(".")
|
|
|
|
let c = col(".")
|
|
|
|
" Do the business:
|
|
|
|
%s/\s\+$//e
|
|
|
|
" Clean up: restore previous search history, and cursor position
|
|
|
|
let @/=_s
|
|
|
|
call cursor(l, c)
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
" Don't strip whitespace for files like md,txt or csv/sql - define files here
|
|
|
|
au BufWritePre *.{php,html,scss,css,js,ts,xml,json,inc,vim,rb} :call <SID>StripTrailingWhitespaces()
|
2013-05-11 20:26:43 +00:00
|
|
|
|