Skip to content

Instantly share code, notes, and snippets.

@karptonite
Created April 7, 2014 01:34
Show Gist options
  • Save karptonite/10013630 to your computer and use it in GitHub Desktop.
Save karptonite/10013630 to your computer and use it in GitHub Desktop.
source ~/dotfiles/bundles.vim
set background=dark
" let g:solarized_visibility="low"
colorscheme solarized
" handled by vim-sleuth now?
set tabstop=3
set softtabstop=3
set shiftwidth=3
let php_sql_query=1
let g:syntastic_always_populate_loc_list = 1
set backupdir=~/vimtmp
set dir=~/vimtmp
set number
set relativenumber
set hlsearch
set cursorline
call togglebg#map("")
set guifont=Menlo\ Regular:h12
set hidden
cnoremap <C-p> <Up>
cnoremap <C-n> <Down>
runtime macros/matchit.vim
set smartcase
set ignorecase
set title
set wrap linebreak
set listchars=tab:▸\ ,trail:·
" Fix the & command in normal+visual modes {{{2
nnoremap & :&&<Enter>
xnoremap & :&&<Enter>
let mapleader = ","
noremap \ ,
nnoremap ' `
nnoremap ` '
set wildmode=list:longest
" tabularize both = an =>
map <leader>] :Tab /=>\=<CR>
nmap <silent> <leader>d <Plug>DashSearch
nmap <leader>v :tabedit $MYVIMRC<CR>
nmap <leader>c yi'f'a => self::<ESC>"0pviwUA
" Bubble single lines
nmap <C-Up> [e
nmap <C-Down> ]e
" Bubble multiple lines
vmap <C-Up> [egv
vmap <C-Down> ]egv
nnoremap <leader>u :GundoToggle<CR>
if has("autocmd")
autocmd! bufwritepost .vimrc source $MYVIMRC
" autocmd BufRead,BufNewFile *.tpl set filetype=smarty
endif
autocmd FileType php set commentstring=//\ %s
set ssop-=options " do not store global and local values in a session
set ssop-=folds " do not store folds
let g:ctrlp_show_hidden = 1
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_max_files=30000
" Folding settings
nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
set wildignore+=*/pear/*,*/Zend/*,*/EbatNs/*,*/angular-1.1.x/*,*/documentation/*,*/vendor/*
" Syntastic settings{{{
let g:syntastic_php_checkers = ['php']
" search .htaccess with Silver Searcher
let g:agprg="ag --column --hidden"
let g:acp_enableAtStartup = 0
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1
" Use smartcase.
let g:neocomplete#enable_smart_case = 1
" Set minimum syntax keyword length.
let g:neocomplete#sources#syntax#min_keyword_length = 3
let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
autocmd FileType php setlocal omnifunc=phpcomplete#CompleteTags
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
" SuperTab like snippets behavior.
imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)"
\: pumvisible() ? "\<C-n>" : "\<TAB>"
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)"
\: "\<TAB>"
" For snippet_complete marker.
if has('conceal')
set conceallevel=2 concealcursor=i
endif
"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment