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 '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'
|
2013-12-11 13:00:05 +00:00
|
|
|
Bundle 'justinmk/vim-sneak'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'kien/ctrlp.vim'
|
2014-01-16 17:21:18 +00:00
|
|
|
Bundle 'kshenoy/vim-signature'
|
2014-02-22 23:47:08 +00:00
|
|
|
Bundle "mattn/emmet-vim"
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'mattn/gist-vim'
|
|
|
|
Bundle 'mattn/webapi-vim'
|
2013-12-11 13:00:05 +00:00
|
|
|
Bundle 'mbbill/undotree'
|
2014-01-21 21:26:44 +00:00
|
|
|
Bundle 'mhinz/vim-signify'
|
2013-11-23 15:54:42 +00:00
|
|
|
Bundle 'rizzatti/dash.vim'
|
2013-12-07 14:33:30 +00:00
|
|
|
Bundle 'rizzatti/funcoo.vim'
|
2013-05-12 17:39:10 +00:00
|
|
|
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'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'tpope/vim-fugitive'
|
|
|
|
Bundle 'tpope/vim-ragtag'
|
|
|
|
Bundle 'tpope/vim-repeat'
|
|
|
|
Bundle 'tpope/vim-surround'
|
|
|
|
Bundle 'tpope/vim-unimpaired'
|
|
|
|
|
|
|
|
|
|
|
|
" Additional syntaxes
|
2013-12-11 13:00:05 +00:00
|
|
|
Bundle 'beyondwords/vim-twig'
|
|
|
|
Bundle 'elzr/vim-json'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'hail2u/vim-css3-syntax'
|
2014-02-22 23:47:08 +00:00
|
|
|
Bundle 'joshtronic/php.vim'
|
|
|
|
Bundle 'mustache/vim-mustache-handlebars'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'othree/html5.vim'
|
|
|
|
Bundle 'pangloss/vim-javascript'
|
|
|
|
Bundle 'tpope/vim-git'
|
|
|
|
Bundle 'tpope/vim-haml'
|
2013-12-07 14:33:30 +00:00
|
|
|
Bundle 'tpope/vim-markdown'
|
2013-05-12 17:39:10 +00:00
|
|
|
Bundle 'webgefrickel/vim-typoscript'
|
|
|
|
|
|
|
|
|
2014-01-16 17:21:18 +00:00
|
|
|
" Color themes -- one to rule them all!
|
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
|
2014-02-22 23:47:08 +00:00
|
|
|
set noshowmode " dont show active mode -- we use airline for that
|
2012-05-28 14:38:01 +00:00
|
|
|
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
|
2014-01-21 21:26:44 +00:00
|
|
|
set scrolljump=5 " Lines to scroll when cursor leaves screen
|
|
|
|
set scrolloff=3 " Minimum lines to keep above and below cursor
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-12-07 14:33:30 +00:00
|
|
|
set lazyredraw " Don't redraw while executing macros
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" nice Whitespace chars
|
|
|
|
set list!
|
2013-12-07 14:33:30 +00:00
|
|
|
set listchars=extends:»,precedes:«,tab:▸\ ,trail:·
|
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
|
|
|
|
|
2014-01-15 18:35:18 +00:00
|
|
|
" use ag for grepping
|
|
|
|
set grepprg=ag
|
|
|
|
|
|
|
|
" no delay for escaping
|
|
|
|
set noesckeys
|
|
|
|
|
2013-12-07 14:33:30 +00:00
|
|
|
" gui options for macvim
|
2012-09-19 21:24:12 +00:00
|
|
|
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-07-19 18:40:08 +00:00
|
|
|
set t_Co=256
|
|
|
|
set background=dark
|
2014-01-16 17:21:18 +00:00
|
|
|
colorscheme solarized
|
2013-07-19 18:40:08 +00:00
|
|
|
let g:solarized_termtrans = 1
|
|
|
|
let g:solarized_contrast = 'high'
|
2014-01-21 21:26:44 +00:00
|
|
|
|
2014-02-22 23:47:08 +00:00
|
|
|
" minor optical fix vor syntastic / vim-signature
|
2014-01-16 17:21:18 +00:00
|
|
|
highlight SignColumn ctermbg=8
|
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
|
2013-12-04 10:51:06 +00:00
|
|
|
set cpo+=$
|
|
|
|
|
|
|
|
" 2 spaces after a sentence for easier text manupulation
|
|
|
|
set cpo+=J
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
" 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
|
2013-12-07 14:33:30 +00:00
|
|
|
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*.,*/.DS_Store
|
2012-05-28 14:38:01 +00:00
|
|
|
set wildmenu
|
|
|
|
|
|
|
|
set nobackup " no backups
|
|
|
|
set nowritebackup
|
|
|
|
set noswapfile " no swp-files
|
|
|
|
|
|
|
|
" Better folding
|
|
|
|
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
|
|
|
|
|
2013-12-07 14:33:30 +00:00
|
|
|
" pasting and copying
|
|
|
|
set pastetoggle=<F2> " toggle paste-mode for c&p with F2
|
|
|
|
set clipboard=unnamed " osx + tmux fix
|
|
|
|
|
|
|
|
" get rid of the delay when pressing O (for example)
|
2013-12-11 13:00:05 +00:00
|
|
|
set timeout timeoutlen=800 ttimeoutlen=100
|
2013-12-07 14:33:30 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-11-23 19:00:03 +00:00
|
|
|
" Custom key mappings and shortcuts
|
|
|
|
" ======================================================================
|
2013-07-05 16:49:04 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" set the leader to comma , and ; == : -- faster commands
|
|
|
|
let mapleader = ","
|
2014-02-22 23:47:08 +00:00
|
|
|
let g:mapleader = ","
|
|
|
|
let maplocalleader = ","
|
|
|
|
let g:maplocalleader = ","
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
nnoremap ; :
|
2013-12-31 13:54:47 +00:00
|
|
|
vnoremap ; :
|
2013-12-07 14:33:30 +00:00
|
|
|
|
|
|
|
" Swap v and CTRL-V, because Block mode is more useful
|
|
|
|
nnoremap v <C-V>
|
|
|
|
nnoremap <C-V> v
|
|
|
|
vnoremap v <C-V>
|
|
|
|
vnoremap <C-V> v
|
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
" 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-12-11 13:00:05 +00:00
|
|
|
nnoremap <leader>ve <C-w>v<C-w>l :e ~/.vimrc<cr>
|
2013-07-19 17:17:05 +00:00
|
|
|
nnoremap <leader>vs :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-12-07 14:33:30 +00:00
|
|
|
" start a new document-wide seach-replace
|
2013-07-05 16:49:04 +00:00
|
|
|
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>
|
|
|
|
|
2014-01-14 13:39:40 +00:00
|
|
|
" Bubble/indent lines using unimpaired
|
|
|
|
nmap <C-k> [e
|
|
|
|
nmap <C-j> ]e
|
|
|
|
nmap <C-h> <<
|
|
|
|
nmap <C-l> >>
|
2014-01-14 13:43:23 +00:00
|
|
|
vmap <C-k> [egv
|
|
|
|
vmap <C-j> ]egv
|
|
|
|
vmap <C-h> <gv
|
|
|
|
vmap <C-l> >gv
|
2012-05-28 14:38:01 +00:00
|
|
|
|
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
|
2013-07-19 17:17:05 +00:00
|
|
|
nmap <leader>sw :s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/<CR>`'
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2012-09-19 21:24:12 +00:00
|
|
|
" change working directory to current file
|
2013-07-19 17:17:05 +00:00
|
|
|
nnoremap <leader>w :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-12-07 14:33:30 +00:00
|
|
|
lnoremap <F5> :checktime<CR>
|
2012-12-03 12:46:43 +00:00
|
|
|
|
2013-07-05 16:49:04 +00:00
|
|
|
" 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>
|
|
|
|
|
2013-12-31 13:54:47 +00:00
|
|
|
" short command to strip trainling whitepsace
|
|
|
|
nnoremap <leader>s ms:%s/\s\+$//e<cr>:noh<cr>`s
|
2012-12-03 12:46:43 +00:00
|
|
|
|
2014-01-21 21:26:44 +00:00
|
|
|
" Find merge conflict markers
|
|
|
|
map <leader>fc /\v^[<\|=>]{7}( .*\|$)<CR>
|
|
|
|
|
|
|
|
" For when you forget to sudo.. Really Write the file.
|
|
|
|
cmap w!! w !sudo tee % >/dev/null
|
|
|
|
|
2014-02-22 16:36:04 +00:00
|
|
|
" Map <Leader>j to display all lines with keyword under cursor and ask which one to jump to
|
|
|
|
nmap <Leader>j [I:let nr = input("Enter line number: ")<Bar>exe "normal " . nr ."[\t"<CR>
|
2014-01-21 21:26:44 +00:00
|
|
|
|
2013-11-23 19:00:03 +00:00
|
|
|
" Plugins
|
|
|
|
" ======================================================================
|
|
|
|
"
|
|
|
|
" Ag
|
2013-12-06 16:28:10 +00:00
|
|
|
nnoremap <leader>a :Ag!<space>
|
|
|
|
nnoremap <leader>A :Ag! <C-r><C-w><cr>
|
2013-11-23 19:00:03 +00:00
|
|
|
|
|
|
|
" NERDtree
|
2012-05-28 14:38:01 +00:00
|
|
|
nnoremap <leader>n :NERDTreeToggle<cr>
|
2013-12-07 14:33:30 +00:00
|
|
|
nnoremap <leader>o :NERDTreeFind<cr>
|
|
|
|
let NERDTreeAutoDeleteBuffer=1
|
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
|
|
|
|
|
2013-11-23 19:00:03 +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
|
|
|
|
2013-11-23 19:00:03 +00:00
|
|
|
|
2013-12-11 13:00:05 +00:00
|
|
|
" Undotree
|
|
|
|
nnoremap <F3> :UndotreeToggle<cr>
|
|
|
|
|
|
|
|
|
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-11-23 19:00:03 +00:00
|
|
|
|
2013-12-07 14:33:30 +00:00
|
|
|
" Tabularize
|
|
|
|
nmap <Leader>s= :Tabularize /=<CR>
|
|
|
|
vmap <Leader>s= :Tabularize /=<CR>
|
|
|
|
nmap <Leader>s{ :Tabularize /{<CR>
|
|
|
|
vmap <Leader>s{ :Tabularize /{<CR>
|
|
|
|
nmap <Leader>s: :Tabularize /:<CR>
|
|
|
|
vmap <Leader>s: :Tabularize /:<CR>
|
|
|
|
nmap <Leader>s, :Tabularize /,<CR>
|
|
|
|
vmap <Leader>s, :Tabularize /,<CR>
|
|
|
|
nmap <Leader>s<Bar> :Tabularize /<Bar><CR>
|
|
|
|
vmap <Leader>s<Bar> :Tabularize /<Bar><CR>
|
2013-05-14 17:32:05 +00:00
|
|
|
|
|
|
|
|
2013-12-11 13:00:05 +00:00
|
|
|
" vim sneak
|
|
|
|
let g:sneak#use_ic_scs = 1
|
|
|
|
let g:sneak#map_netrw = 0
|
|
|
|
let g:sneak#streak = 1
|
|
|
|
nmap <Bslash> <Plug>SneakNext
|
|
|
|
nmap \| <Plug>SneakPrevious
|
|
|
|
xmap <Bslash> <Plug>VSneakNext
|
|
|
|
xmap \| <Plug>VSneakPrevious
|
|
|
|
|
|
|
|
|
2013-11-23 19:00:03 +00:00
|
|
|
" ultisnips
|
|
|
|
let g:UltiSnipsSnippetDirectories = ["snippets"]
|
2013-05-13 19:51:07 +00:00
|
|
|
|
2013-05-12 19:31:07 +00:00
|
|
|
|
2013-11-23 19:00:03 +00:00
|
|
|
" Syntastic
|
2012-05-28 14:38:01 +00:00
|
|
|
" no checking for xhtml/html -- because of fluidtemplate for TYPO3
|
|
|
|
" and no checking for scss.css because of CSS3 and SASS-Variable
|
2013-11-23 19:00:03 +00:00
|
|
|
let g:syntastic_auto_jump = 0
|
2013-12-04 10:51:06 +00:00
|
|
|
let g:syntastic_mode_map = {
|
2013-11-23 19:00:03 +00:00
|
|
|
\ 'mode': 'active',
|
|
|
|
\ 'active_filetypes': ['ruby', 'php', 'javascript'],
|
2013-12-04 10:51:06 +00:00
|
|
|
\ 'passive_filetypes': ['xhtml', 'html', 'scss', 'scss.css', 'css']
|
|
|
|
\ }
|
2013-11-23 19:00:03 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-12-06 16:28:10 +00:00
|
|
|
" CtrlP (using Ag)
|
2013-07-05 16:49:04 +00:00
|
|
|
nnoremap <leader>b :CtrlPBuffer<cr>
|
|
|
|
nnoremap <leader>r :CtrlPMRU<cr>
|
2013-12-07 14:33:30 +00:00
|
|
|
let g:ctrlp_map = '<leader>t'
|
2013-12-06 16:28:10 +00:00
|
|
|
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
|
|
|
|
let g:ctrlp_use_caching = 0
|
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
|
|
|
|
|
2013-11-23 19:00:03 +00:00
|
|
|
|
2012-06-20 17:15:15 +00:00
|
|
|
" Gist filetype-detection
|
|
|
|
let g:gist_detect_filetype = 1
|
2013-12-07 14:33:30 +00:00
|
|
|
let g:gist_open_browser_after_post = 1
|
2012-06-20 17:15:15 +00:00
|
|
|
|
2013-07-16 21:54:40 +00:00
|
|
|
|
|
|
|
" airline config
|
2013-11-23 19:00:03 +00:00
|
|
|
let g:airline_theme = 'solarized'
|
|
|
|
let g:airline_left_sep = '▶'
|
|
|
|
let g:airline_right_sep = '◀'
|
2013-07-16 21:54:40 +00:00
|
|
|
|
|
|
|
|
2013-07-19 17:17:05 +00:00
|
|
|
" Mac Dash.app integration
|
|
|
|
nmap <silent> <leader>d <Plug>DashSearch
|
|
|
|
nmap <silent> <leader>D <Plug>DashGlobalSearch
|
|
|
|
let g:dash_map = {
|
|
|
|
\ 'javascript' : 'jquery'
|
|
|
|
\ }
|
2012-09-19 21:24:12 +00:00
|
|
|
|
|
|
|
|
2014-02-22 23:47:08 +00:00
|
|
|
" emmet -- only use the html-expansion
|
|
|
|
let g:user_emmet_install_global = 0
|
|
|
|
autocmd FileType html,php,twig EmmetInstall
|
|
|
|
imap <expr> <C-e> emmet#expandAbbrIntelligent("\<C-e>")
|
|
|
|
|
2014-01-16 17:21:18 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2013-11-23 19:00:03 +00:00
|
|
|
" Other functions / Onload, Autocommands
|
2013-11-23 15:54:42 +00:00
|
|
|
" ======================================================================
|
|
|
|
|
|
|
|
" spell correction on text-files
|
|
|
|
autocmd BufRead,BufNewFile *.{md|rst|txt} setlocal spell
|
|
|
|
|
2013-12-07 14:33:30 +00:00
|
|
|
" add the dash to keywords -- makes better css/js/html search
|
2013-12-11 13:00:05 +00:00
|
|
|
" do this for specific files only (not in php/rb e.g.)
|
2013-12-07 14:33:30 +00:00
|
|
|
au BufNewFile,BufRead *.{json,js,css,scss,html} set iskeyword+=-
|
|
|
|
au BufNewFile,BufRead *.{json,js,css,scss,html} set iskeyword-=_
|
|
|
|
|
|
|
|
|
|
|
|
" Syntaxes for other files
|
2013-11-23 19:00:03 +00:00
|
|
|
au BufNewFile,BufRead Phakefile set ft=php
|
2013-12-31 13:54:47 +00:00
|
|
|
au BufNewFile,BufRead *.twig set ft=html.twig
|
2014-02-22 23:47:08 +00:00
|
|
|
au BufNewFile,BufRead *.twig set ft=html.twig
|
2014-02-22 16:36:04 +00:00
|
|
|
au BufNewFile,BufRead *.{txt,ts} set ft=typoscript
|
2013-11-23 15:54:42 +00:00
|
|
|
|
2013-11-23 19:00:03 +00:00
|
|
|
" Remember last location/cursor in file
|
|
|
|
if has("autocmd")
|
|
|
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
|
|
|
\| exe "normal g'\"" | endif
|
|
|
|
endif
|
2013-05-11 20:26:43 +00:00
|
|
|
|