Last active
May 10, 2018 10:11
-
-
Save tomcss/402e14712b0349194138 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'sheerun/vim-polyglot' | |
Plugin 'Syntastic' | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'terryma/vim-multiple-cursors' | |
Plugin 'ervandew/supertab' | |
Plugin 'simmel/vim-pastie' | |
Plugin 'powerline/powerline' | |
Plugin 'pangloss/vim-javascript' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - list configured plugins | |
" :PluginInstall(!) - install (update) plugins | |
" :PluginSearch(!) foo - search (or refresh cache first) for foo | |
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
if has("autocmd") | |
" Enable filetype detection | |
" filetype plugin indent on | |
" | |
" " Restore cursor position | |
autocmd BufReadPost * | |
\ if line("'\"") > 1 && line("'\"") <= line("$") | | |
\ exe "normal! g`\"" | | |
\ endif | |
endif | |
filetype on | |
syntax on | |
set ts=4 | |
set shiftwidth=4 | |
set expandtab | |
set ai | |
set fo-=r | |
set synmaxcol=120 | |
colorscheme gruvbox | |
set background=dark | |
iab _today <C-R>=strftime("%d %b, %Y") | |
iab _now <C-R>=strftime("%H:%M:%S") | |
iab _sig <C-R>=strftime("%d %b, %Y -- Tom Scheper, [email protected]") | |
iab _env #!/usr/bin/env | |
"nmap <tab> :tabnew | |
nmap <tab> <C-W> | |
"au BufWinLeave * mkview | |
"au BufWinEnter * silent loadview | |
set foldmethod=marker | |
set foldmarker={{{,}}} | |
set foldopen=hor | |
set number | |
set cul | |
"let Tlist_Auto_Open=1 | |
set path=.,,** | |
"Bundle 'powerline/powerline', {'rtp': 'powerline/bindings/vim/'} | |
"python from powerline.vim import setup as powerline_setup | |
"python powerline_setup() | |
"python del powerline_setup | |
"set laststatus=2 | |
set statusline=%<%f\%h%m%r%=%-20.(line=%l\ \ col=%c%V\ \ totlin=%L%)\ \ \%h%m%r%=%-40(bytval=0x%B,%n%Y%)\%P | |
function ScssToCss() | |
let current_file = shellescape(expand('%:p')) | |
let filename = shellescape(expand('%:r')) | |
let command = "silent !sass " . current_file . " " . filename . ".css" | |
execute command | |
endfunction | |
autocmd BufWritePost,FileWritePost *.scss call ScssToCss() | |
" Emmet config | |
Plugin 'mattn/emmet-vim' | |
let g:user_emmet_leader_key=';' | |
" Autosave on change after every 100 ms | |
set updatetime=1000 | |
au CursorHold * :update | |
" Setting blade to use html indentation | |
au BufNewFile,BufRead *.blade.php set filetype=html | |
au BufNewFile,BufRead *.edge set filetype=html | |
" Setting short cuts for tabs | |
nnoremap <C-Left> :tabprevious<CR> | |
nnoremap <C-Right> :tabnext<CR> | |
nnoremap \ :!./%<CR> | |
imap <C-\> <C-C> | |
nnoremap tj :tabfirst<CR> | |
nnoremap tl :tabnext<CR> | |
nnoremap th :tabprev<CR> | |
nnoremap tk :tablast<CR> | |
nnoremap tt :tabedit<Space> | |
nnoremap tn :tabnext<Space> | |
nnoremap tm :tabm<Space> | |
nnoremap td :tabclose<CR> | |
nnoremap tf :tabfind<Space> | |
if &term =~ '256color' | |
" disable Background Color Erase (BCE) so that color schemes | |
" render properly when inside 256-color tmux and GNU screen. | |
" see also http://snk.tuxfamily.org/log/vim-256color-bce.html | |
set t_ut= | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment