|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
"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 exrc ""You can get some cuntomizations if therre is a vimrc on the local eare that you are it will use it.
|
|
|
|
|
set guicursor= ""Bi cursor for oldstyle lovers.
|
|
|
|
|
set relativenumber ""Show the line beofre and ofetr starting from your line
|
|
|
|
|
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 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.
|
|
|
|
@ -12,23 +12,24 @@ 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.
|
|
|
|
|
|
|
|
|
|
"Backup and Undo
|
|
|
|
|
set noswapfile ""No swap file. they are anoying
|
|
|
|
|
set nobackup ""Nobackup because we will do a undo dir
|
|
|
|
|
set undodir=~/.vim/undodir
|
|
|
|
|
set undofile
|
|
|
|
|
|
|
|
|
|
packadd termdebug
|
|
|
|
|
let g:termdebug_wide=1
|
|
|
|
|
|
|
|
|
|
filetype plugin indent on
|
|
|
|
|
syntax enable
|
|
|
|
|
|
|
|
|
|
:autocmd InsertEnter,InsertLeave * set cul!
|
|
|
|
|
"--------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
"PLUGINS-------------------------------------------------------------
|
|
|
|
|
"plugins(included with vim) for file specific mappings Located at ~/.vim/ftplugin/
|
|
|
|
|
"Example for c Would be: ~/.vim/ftplugin/c_mappings.vim
|
|
|
|
|
filetype plugin on
|
|
|
|
|
|
|
|
|
|
"Plug pkluginmanager start and end
|
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
|
Plug 'gruvbox-community/gruvbox'
|
|
|
|
|
Plug 'arcticicestudio/nord-vim'
|
|
|
|
@ -36,7 +37,6 @@ Plug 'vim-utils/vim-man'
|
|
|
|
|
Plug 'mbbill/undotree'
|
|
|
|
|
Plug 'gyim/vim-boxdraw'
|
|
|
|
|
Plug 'vim-airline/vim-airline'
|
|
|
|
|
""Plug 'theprimeagen/vim-be-good'
|
|
|
|
|
call plug#end()
|
|
|
|
|
"--------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
@ -44,37 +44,63 @@ call plug#end()
|
|
|
|
|
set colorcolumn=100
|
|
|
|
|
highlight ColorColumn ctermbg=0 guibg=lightgrey
|
|
|
|
|
set signcolumn=yes
|
|
|
|
|
|
|
|
|
|
colorscheme gruvbox
|
|
|
|
|
set background=dark
|
|
|
|
|
highlight Normal guibg=blue
|
|
|
|
|
|
|
|
|
|
" lightline
|
|
|
|
|
"" set noshowmode
|
|
|
|
|
""let g:lightline = { 'colorscheme': 'nord' }
|
|
|
|
|
"--------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
"REMAPS--------------------------------------------------------------
|
|
|
|
|
"(VIM) Remaps Spca bar as the Leader command
|
|
|
|
|
let mapleader=" "
|
|
|
|
|
"Ease of window jumg intead of ^wj etc..
|
|
|
|
|
map <leader>h :wincmd h<CR>
|
|
|
|
|
map <leader>j :wincmd j<CR>
|
|
|
|
|
map <leader>k :wincmd k<CR>
|
|
|
|
|
map <leader>l :wincmd l<CR>
|
|
|
|
|
|
|
|
|
|
"(NAVIGATION)
|
|
|
|
|
"Switches to the Left window
|
|
|
|
|
map <silent> <leader>h :wincmd h<CR><CR>
|
|
|
|
|
"Switches to the Bottom window
|
|
|
|
|
map <silent> <leader>j :wincmd j<CR><CR>
|
|
|
|
|
"Switches to the Top window
|
|
|
|
|
map <silent> <leader>k :wincmd k<CR><CR>
|
|
|
|
|
"Switches to the Right window
|
|
|
|
|
map <silent> <leader>l :wincmd l<CR><CR>
|
|
|
|
|
|
|
|
|
|
"(FILES)
|
|
|
|
|
map <leader>fw :Sex! <bar> :vertical resize 30<CR>
|
|
|
|
|
map <leader>u :UndotreeShow<CR>
|
|
|
|
|
|
|
|
|
|
"(POSITION)
|
|
|
|
|
"[P]ut one line [U]p everything from the cursor till the end of the line
|
|
|
|
|
map <leader>pu d$O<ESC>p
|
|
|
|
|
"[P]ut one line [D]own everything from the cursor till the end of the line
|
|
|
|
|
map <leader>pd d$o<ESC>p
|
|
|
|
|
|
|
|
|
|
"(WORD) Manipulation
|
|
|
|
|
"[W]ord [R]reformat for word under the cursor
|
|
|
|
|
map <leader>wr ebvey:%s/<C-R>0//g<left><left>
|
|
|
|
|
"[C]hange [W]ord in registered buffer To be more similar to whant vim implment
|
|
|
|
|
map <leader>cw ebvey/<C-R>0<CR>Ncw
|
|
|
|
|
"[C]hange [N]ext word in registered buffer To be more similar to what vim implements
|
|
|
|
|
map <leader>cn ncw
|
|
|
|
|
"[W]ord [N]ext occurence for word under the cursor
|
|
|
|
|
map <leader>wn ebvey/<C-R>0<CR>
|
|
|
|
|
"[W]ord [P]revious occurence for word under the cursor
|
|
|
|
|
map <leader>wp ebvey/<C-R>0<CR>NN
|
|
|
|
|
"[W]ord [S]earch for word under the cursor
|
|
|
|
|
map <leader>ws ebvey/<C-R>0
|
|
|
|
|
"[W]ord [F]ind [F]irst for word under the cursor
|
|
|
|
|
map <silent> <leader>wff ebveyG/<C-R>0<CR>
|
|
|
|
|
"[W]ord [F]ind [L]ast for word under the cursor
|
|
|
|
|
map <silent> <leader>wfl ebveyG/<C-R>0<CR>N
|
|
|
|
|
"--------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
"DEBUGER--------------------------------------------------------------
|
|
|
|
|
map <leader>db :Termdebug <bar> :vertical resize 30<CR>
|
|
|
|
|
noremap <silent> <leader>ts :Step<cr>
|
|
|
|
|
noremap <silent> <leader>to :Over<cr>
|
|
|
|
|
noremap <silent> <leader>tn :Next<cr>
|
|
|
|
|
noremap <silent> <leader>tc :Cont<cr>
|
|
|
|
|
map <leader>pv :Sex! <bar> :vertical resize 30<CR>
|
|
|
|
|
map ,/ :s/^/\/\//<CR>
|
|
|
|
|
map ,{ :s/);/)\r{\r\t\r}\r/g<CR>
|
|
|
|
|
map <leader>ra ebvey :%s/<C-R>0/
|
|
|
|
|
"--------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
"WILDMENU FOR FUZZY FILE SEARCH--------------------------------------
|
|
|
|
|
filetype plugin on "plugins(included with vim) for netrw
|
|
|
|
|
set path+=**
|
|
|
|
|
|
|
|
|
|
set wildmenu "Display all matching files when we tab complete
|
|
|
|
@ -106,30 +132,17 @@ command! MakeTags !ctags -R .
|
|
|
|
|
" - Use ^n and ^p to go back and forth in the suggestion list
|
|
|
|
|
"--------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
"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
|
|
|
|
|
let g:netrw_list_hide=netrw_gitignore#Hide()
|
|
|
|
|
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
|
|
|
|
|
|
|
|
|
|
" NOW WE CAN:
|
|
|
|
|
" - :edit a folder to open a file browser
|
|
|
|
|
" - <CR>/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.html<CR>3jwf>a
|
|
|
|
|
|
|
|
|
|
" NOW WE CAN:
|
|
|
|
|
" - Take over the world!
|
|
|
|
|
" (with much fewer keystrokes)
|
|
|
|
|
" Command Read template move cursor
|
|
|
|
|
nnoremap <leader>shs :-1read $HOME/.vim/snippets/html_skeleton.html<CR>5jwf>a
|
|
|
|
|
nnoremap <leader>shb :-1read $HOME/.vim/snippets/html_vertical_bracets.html<CR>:s/VARTOCHANGE//g<left><left>
|
|
|
|
|
nnoremap <leader>sht :-1read $HOME/.vim/snippets/html_horizontal_bracets.html<CR>:.,+2s/VARTOCHANGE//g<left><left>
|
|
|
|
|
nnoremap <leader>scf :-1read $HOME/.vim/snippets/c_for.c<CR>yi)/<C-R>0<CR>N:s/VARTOCHANGE//g<left><left>
|
|
|
|
|
nnoremap <leader>scs :-1read $HOME/.vim/snippets/c_switch.c<CR>yi)/<C-R>0<CR>Ncw
|
|
|
|
|
nnoremap <leader>scw :-1read $HOME/.vim/snippets/c_while.c<CR>yi)/<C-R>0<CR>Ncw
|
|
|
|
|
"--------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"BUILD INTEGRATION---------------------------------------------------
|
|
|
|
|
" Steal Mr. Bradley's formatter & add it to our spec_helper
|
|
|
|
|
" http://philipbradley.net/rspec-into-vim-with-quickfix
|
|
|
|
|