Created
April 23, 2018 18:24
-
-
Save Thomascountz/eaf6008926b1295ce22c72a901e27e2b to your computer and use it in GitHub Desktop.
vim dotfile
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 relativenumber " relative line numbers | |
set tabstop=2 " soft tabs | |
set shiftwidth=2 " soft tabs | |
set expandtab " use spaces for tabs | |
set backspace=2 " backspace in insert mode works like normal editor | |
syntax on " syntax highlighting | |
filetype indent on " activates indenting for files | |
set autoindent " auto indenting | |
set number " line numbers | |
colorscheme desert " colorscheme desert | |
set nobackup " get rid of anoying ~file | |
" open nerdtree automatically | |
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 | endif | |
" make nerdtree pretty | |
let NERDTreeMinimalUI = 1 | |
let NERDTreeDirArrows = 1 | |
" quicker window movement | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" NerdTree mappings | |
nmap <C-n> :NERDTreeToggle<CR> | |
" Run ruby file | |
map <leader>r :!ruby %<cr> | |
" vim-spec mappings | |
nmap <leader>s :TestNearest<CR> | |
nmap <leader>t :TestFile<CR> | |
nmap <leader>a :TestSuite<CR> | |
nmap <leader>l :TestLast<CR> | |
nmap <leader>g :TestVisit<CR> | |
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() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'janko-m/vim-test' | |
Plugin 'ctrlpvim/ctrlp.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'jremmen/vim-ripgrep' | |
Plugin 'vim-ruby/vim-ruby' | |
Plugin 'tpope/vim-surround' | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just | |
" :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to | |
" auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment