Created
February 7, 2019 15:46
-
-
Save jeccb-zz/ee70910465501a056d50dee3c1fa9cef to your computer and use it in GitHub Desktop.
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
let mapleader="," | |
set nocompatible "Use Vim settings, rather then Vi settings (much better!). | |
filetype off " required | |
syntax on " syntax highlight | |
" 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' | |
" Editor's plugins | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'vim-scripts/bufexplorer.zip' | |
Plugin 'kien/ctrlp.vim' | |
Plugin 'editorconfig/editorconfig-vim' | |
Plugin 'Lokaltog/vim-powerline' | |
Plugin 'altercation/vim-colors-solarized' | |
Plugin 'mbbill/undotree' | |
Plugin 'jlanzarotta/bufexplorer' | |
Plugin 'kburdett/vim-nuuid' | |
Plugin 'tpope/vim-fugitive' | |
" Lang's plugins | |
Plugin 'tmhedberg/matchit' | |
Plugin 'godlygeek/tabular' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'vim-ruby/vim-ruby' | |
Plugin 'thoughtbot/vim-rspec' | |
Plugin 'elixir-lang/vim-elixir' | |
Plugin 'fatih/vim-go' | |
Plugin 'janko-m/vim-test' | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" Options | |
set showcmd "show incomplete cmds down the bottom | |
set showmode "show current mode down the bottom | |
set incsearch "find the next match as we type the search | |
set hlsearch "hilight searches by default | |
set nowrap "dont wrap lines | |
set mouse=a "some stuff to get the mouse going in term | |
set t_Co=256 "tell the term has 256 colors | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set autoindent | |
set nobackup | |
set noswapfile | |
set nu | |
set cursorcolumn | |
set guifont=Inconsolata\ Bold\ 12 | |
set clipboard=unnamedplus | |
set ttyfast | |
" Color scheme | |
set background=dark | |
colorscheme deus | |
" Disable gui options | |
if has('gui_running') | |
set guioptions-=m "remove menu bar | |
set guioptions-=T "remove toolbar | |
set guioptions-=r "remove right-hand scroll bar | |
set guioptions-=L "remove left-hand scroll bar | |
endif | |
" key mapping for window navigation | |
map <C-h> <C-w>h | |
map <C-j> <C-w>j | |
map <C-k> <C-w>k | |
map <C-l> <C-w>l | |
" Byebug macro | |
map ,b Orequire 'byebug'; byebug<ESC> | |
" Delete trailing white space on save | |
func! DeleteTrailingWS() | |
exe "normal mz" | |
%s/\s\+$//ge | |
exe "normal `z" | |
endfunc | |
autocmd BufWrite * :call DeleteTrailingWS() | |
""" Plugins Configuration | |
" NERDTree options | |
nmap <silent> \p :NERDTreeToggle<CR> | |
nmap <silent> \f :NERDTreeFind<CR> | |
" BufExplorer options | |
nmap <silent> <C-b> :BufExplorer<CR> | |
" vim-rspec mappings | |
"map <Leader>t :call RunCurrentSpecFile()<CR> | |
"map <Leader>s :call RunNearestSpec()<CR> | |
"map <Leader>l :call RunLastSpec()<CR> | |
"map <Leader>a :call RunAllSpecs()<CR> | |
" these "Ctrl mappings" work well when Caps Lock is mapped to Ctrl | |
map <Leader>s :TestNearest<CR> " | |
map <Leader>t :TestFile<CR> " | |
map <Leader>a :TestSuite<CR> " | |
map <Leader>l :TestLast<CR> " | |
map <Leader>g :TestVisit<CR> " | |
" Undotree mappings | |
nmap <silent> <Leader>u :UndotreeToggle<CR> | |
" UUID mappings | |
let g:nuuid_no_mappings = 1 | |
nmap <Leader>d <Plug>Nuuid | |
" Pry macro | |
map ,p Orequire 'pry'; binding.pry<ESC> | |
" NERDTree parent folder | |
map \o :e %:h<CR> | |
" Useful status information at bottom of screen | |
"set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{fugitive#statusline()}\ %{exists('g:loaded_rvm')?rvm#statusline():''}\ %=%-16(\ %l,%c-%v\ %)%P | |
"statusline setup | |
set statusline=%f " tail of the filename | |
set statusline+=\ [%{strlen(&fenc)?&fenc:'none'}, " file encoding | |
set statusline+=\ %{&ff}] " file format | |
set statusline+=\ %r " Opened type (read-only) | |
set statusline+=\ %m " Modify? | |
set statusline+=\ %y " File type (vim, php, ruby) | |
set statusline+=\ %{fugitive#statusline()} " Git | |
set statusline+=\ %{exists('g:loaded_rvm')?rvm#statusline():''} " RVM | |
set statusline+=%= " left/right separator | |
set statusline+=%c, " cursor column | |
set statusline+=%l/%L " cursor line/total lines | |
set statusline+=\ %P " percent through file | |
" Warning syntastic | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment