" Vim with all enhancements source $VIMRUNTIME/vimrc_example.vim " Mouse behavior (the Unix way) behave xterm " Use the internal diff if available. " Otherwise use the special 'diffexpr' for Windows. if &diffopt !~# 'internal' set diffexpr=MyDiff() endif function MyDiff() let opt = '-a --binary ' if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif let arg1 = v:fname_in if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif let arg1 = substitute(arg1, '!', '\!', 'g') let arg2 = v:fname_new if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif let arg2 = substitute(arg2, '!', '\!', 'g') let arg3 = v:fname_out if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif let arg3 = substitute(arg3, '!', '\!', 'g') if $VIMRUNTIME =~ ' ' if &sh =~ '\ ' . arg3 if exists('l:shxq_sav') let &shellxquote=l:shxq_sav endif endfunction language en_US.utf8 "BASICS-------------------------------------------------------------- set exrc ""You can get some cuntomizations if therre is a vimrc on the local eare that you are it wiil use it. set guicursor= ""Bi cursor for oldstyle lovers. set relativenumber ""Show the line beofre and ofetr starting from your line set noerrorbells ""No sound effects. set tabstop=4 ""TabSize of 4 set shiftwidth=4 ""Indentation fo 4 set softtabstop=4 ""Enabeling it will remplace tabs by spaces in insert mode set noexpandtab ""Enabeling it will remplace tabs by spaces set smartindent ""will try it's best to indent for you. set nowrap ""Will continue to go right when line is too long set incsearch ""incremental searching as i am typing the words will be highligted. set number ""Self explanatory set scrolloff=8 ""Will start to scroll down wehn there is still 8 Lines before end of page. :autocmd InsertEnter,InsertLeave * set cul! "Backup and Undo set noswapfile ""No swap file. they are anoying set nobackup ""Nobackup because we will do a undo dir set undodir=~/vimfiles/undodir set undofile packadd termdebug let g:termdebug_wide=1 filetype plugin indent on syntax enable "PLUGINS------------------------------------------------------------- call plug#begin('~/vimfiles/pluggin/') Plug 'gruvbox-community/gruvbox' Plug 'arcticicestudio/nord-vim' Plug 'vim-utils/vim-man' Plug 'mbbill/undotree' call plug#end() "-------------------------------------------------------------------- "VISUALS------------------------------------------------------------- set colorcolumn=100 highlight ColorColumn ctermbg=0 guibg=lightgrey set signcolumn=yes colorscheme gruvbox "https://vi.stackexchange.com/questions/27599/colorscheme-displayed-wrongly-with-neovim let g:gruvbox_termcolors=16 set termguicolors set background=dark "REMAPS-------------------------------------------------------------- let mapleader=" " "Ease of window jumg intead of ^wj etc.. map h :wincmd h map j :wincmd j map k :wincmd k map l :wincmd l map u :UndotreeShow map db :Termdebug :vertical resize 30 noremap ts :Step noremap to :Over noremap tn :Next noremap tc :Cont map pv :Sex! :vertical resize 30 map ,/ :s/^/\/\// map ,{ :s/);/)\r{\r\t\r}\r/g "-------------------------------------------------------------------- "FILE BROWSING------------------------------------------------------- let g:netrw_banner=0 " disable annoying banner let g:netrw_browse_split=4 " open in prior window let g:netrw_altv=1 " open splits to the right let g:netrw_liststyle=3 " tree view " NOW WE CAN: " - :edit a folder to open a file browser " - /v/t to open in an h-split/v-split/tab " - check |netrw-browse-maps| for more mappings "PLUGINS------------------------------------------------------------- "-------------------------------------------------------------------- "SNIPPETS------------------------------------------------------------ " Command Read template move cursor nnoremap ,html :-1read $HOME/.vim/.skeleton.html3jwf>a " NOW WE CAN: " - Take over the world! " (with much fewer keystrokes) "-------------------------------------------------------------------- "BUILD INTEGRATION--------------------------------------------------- " Steal Mr. Bradley's formatter & add it to our spec_helper " http://philipbradley.net/rspec-into-vim-with-quickfix " Configure the `make` command to run RSpec set makeprg=bundle\ exec\ rspec\ -f\ QuickfixFormatter " NOW WE CAN: " - Run :make to run RSpec " - :cl to list errors " - :cc# to jump to error by number " - :cn and :cp to navigate forward and back "--------------------------------------------------------------------