Last active
August 10, 2019 16:30
-
-
Save notmarkmiranda/78dd05f09c58c66a772c2d2403a81a4c to your computer and use it in GitHub Desktop.
.vimrc
This file contains 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
" gotta set the leader key first! leave this at the top | |
let mapleader = "," | |
set nocompatible | |
filetype off | |
set noswapfile | |
" ========== general config =========================================== | |
set number | |
" set guifont=Operator\ Mono:20 | |
syntax on | |
" ========== indentation ============================================== | |
set autoindent | |
set smartindent | |
set smarttab | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
" ========== splits =================================================== | |
map <C-h> <C-W>h | |
map <C-j> <C-w>j | |
map <C-k> <C-w>k | |
map <C-l> <C-W>l | |
" the above doesn't work | |
set splitbelow | |
set splitright | |
" ========== plugins ================================================== | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' " required | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'kien/ctrlp.vim' | |
Plugin 'christoomey/vim-tmux-navigator' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'janko/vim-test' | |
Plugin 'jgdavey/tslime.vim' | |
" colorschemes start | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'KKPMW/distilled-vim' | |
Plugin 'KKPMW/oldbook-vim' | |
Plugin 'abnt713/vim-hashpunk' | |
Plugin 'morhetz/gruvbox' | |
" colorschemes end | |
call vundle#end() | |
filetype plugin indent on | |
" ========== set colorscheme ========================================== | |
silent! colorscheme gruvbox " set the colorscheme, but don't complain about it | |
let g:gruvbox_termcolors=256 | |
let g:gruvbox_contrast_dark='medium' | |
let g:gruvbox_bold='1' | |
set background=dark | |
" ========== cursor changes color and form on mode change ============= | |
set cursorline | |
hi CursorLine cterm=NONE ctermbg=gray ctermfg=white | |
hi LineNr cterm=NONE | |
autocmd InsertEnter * highlight CursorLine ctermbg=darkgreen ctermfg=white | |
autocmd InsertLeave * highlight CursorLine ctermbg=gray ctermfg=white | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_SR = "\<Esc>]50;CursorShape=2\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
" ========== NERDTree setup =========================================== | |
map <leader>d :NERDTreeToggle<CR> | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" ========== vim/tmux/rspec =========================================== | |
let test#strategy = "tslime" | |
nmap <leader>t :TestNearest<Cr> | |
nmap <leader>T :TestFile<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment