Skip to content

Instantly share code, notes, and snippets.

@sasha1sum
Created October 14, 2016 17:58
Show Gist options
  • Save sasha1sum/36a3f2fca5bc86f5200684071fd5b2a6 to your computer and use it in GitHub Desktop.
Save sasha1sum/36a3f2fca5bc86f5200684071fd5b2a6 to your computer and use it in GitHub Desktop.
My vimrc 2016-10-14
set autochdir
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Plugins
Plugin 'gmarik/Vundle.vim'
Plugin 'PProvost/vim-ps1'
Plugin 'vim-scripts/xoria256.vim'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
Plugin 'amdt/vim-niji'
"Plugin 'gberenfield/cljfold.vim'
Plugin 'guns/vim-clojure-static'
Plugin 'guns/vim-clojure-highlight'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-vinegar'
Plugin 'tpope/vim-fireplace'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-abolish'
Plugin 'tpope/vim-commentary'
Plugin 'tpope/vim-speeddating'
Plugin 'tpope/vim-unimpaired'
Plugin 'vim-scripts/paredit.vim'
Plugin 'DrTom/fsharp-vim'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'ervandew/supertab'
" Plugin 'scrooloose/syntastic'
Plugin 'maxbrunsfeld/vim-yankstack.git'
"Plugin 'skammer/vim-css-color' "" broken?
"Plugin 'farseer90718/vim-taskwarrior'
Plugin 'lambdatoast/elm.vim'
"" Haskell and Vim in 2016
"" http://www.stephendiehl.com/posts/vim_2016.html
" $ git clone https://github.com/ctrlpvim/ctrlp.vim.git
" $ git clone https://github.com/scrooloose/syntastic.git
" $ git clone https://github.com/tomtom/tlib_vim.git
" $ git clone https://github.com/scrooloose/nerdtree.git
" $ git clone https://github.com/scrooloose/nerdcommenter.git
" $ git clone https://github.com/godlygeek/tabular.git
" $ git clone https://github.com/ervandew/supertab.git
" Plugin 'MarcWeber/vim-addon-mw-utils'
" Plugin 'Shougo/neocomplete.vim'
" Plugin 'garbas/vim-snipmate'
" Plugin 'eagletmt/ghcmod-vim'
" Plugin 'eagletmt/neco-ghc'
call vundle#end()
" colors
set t_Co=256
colorscheme xoria256
syntax on
filetype plugin on
"set omnifunc=syntaxcomplete#Complete
" insert mode highlight
augroup CursorLine
au InsertEnter * setlocal cursorline
au InsertLeave * setlocal nocursorline
augroup END
"" Config
set number
set smartindent
set hidden
set ruler
set wildmenu
set wildmode=longest:full,full
"" keyboard shortcuts
inoremap jk <Esc>
let mapleader = ","
"" backspace broken in some files
set backspace=2
" au BufEnter *.rb setlocal backspace=2
" au BufEnter *.rb setlocal backspace=2
"" indenting
set expandtab
set tabstop=4
set shiftwidth=4
"" Ruby
au BufEnter *.rb setlocal tabstop=2
au BufEnter *.rb setlocal shiftwidth=2
au BufEnter *.clj setlocal tabstop=2
au BufEnter *.clj setlocal shiftwidth=2
"" shortcut commands
command! Date r!date "+\%Y-\%m-\%d"
"" Markdown
let g:vim_markdown_folding_disabled=1
" make external keypad work in terminal vim OSX!
noremap <Esc>Oq 1
noremap <Esc>Or 2
noremap <Esc>Os 3
noremap <Esc>Ot 4
noremap <Esc>Ou 5
noremap <Esc>Ov 6
noremap <Esc>Ow 7
noremap <Esc>Ox 8
noremap <Esc>Oy 9
noremap <Esc>Op 0
noremap <Esc>On .
noremap <Esc>OQ /
noremap <Esc>OR *
noremap <kPlus> +
noremap <Esc>OS -
noremap <Esc>OM <CR>
noremap! <Esc>Oq 1
noremap! <Esc>Or 2
noremap! <Esc>Os 3
noremap! <Esc>Ot 4
noremap! <Esc>Ou 5
noremap! <Esc>Ov 6
noremap! <Esc>Ow 7
noremap! <Esc>Ox 8
noremap! <Esc>Oy 9
noremap! <Esc>Op 0
noremap! <Esc>On .
noremap! <Esc>OQ /
noremap! <Esc>OR *
noremap! <kPlus> +
noremap! <Esc>OS -
noremap! <Esc>OM <CR>
nnoremap gt :tabnext<CR>
nnoremap gT :tabprevious<CR>
" tmux bindings
let g:tmux_navigator_no_mappings = 1
nnoremap <silent> <C-h> :TmuxNavigateLeft<cr>
nnoremap <silent> <C-j> :TmuxNavigateDown<cr>
nnoremap <silent> <C-k> :TmuxNavigateUp<cr>
nnoremap <silent> <C-l> :TmuxNavigateRight<cr>
nnoremap <silent> <C-\> :TmuxNavigatePrevious<cr>
" syntastic
"let g:syntastic_check_on_open=1
"let g:syntastic_enable_signs=1
"let g:syntastic_python_checkers_ = ["pylint"]
" yankstack
call yankstack#setup()
let g:yankstack_map_keys = 0
nnoremap Y y$
nnoremap <leader>p <Plug>yankstack_substitute_older_paste
nnoremap <leader>P <Plug>yankstack_substitute_newer_paste
set clipboard=unnamed
" auto state save
autocmd BufWinLeave *.* mkview
autocmd BufWinEnter *.* silent loadview
" search
set incsearch
set hlsearch
" directory nav
let g:netrw_list_hide = '\(^\|\s\s\)\zs\.\S\+'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment