.vim

[vim] Vim config and utils
git clone https://git.torresjrjr.com/.vim.git
Log | Files | Refs | README

vimrc (1960B)


      1 " vimrc
      2 " Author:  Byron Torres (@torresjrjr) <b@torresjrjr.com>
      3 " License: GPLv3 <https://www.gnu.org/licenses/gpl>
      4 
      5 filetype plugin indent on | syntax enable
      6 
      7 set hidden     showcmd       laststatus=2    showbreak=`
      8 set path+=**   wildmenu      wildignorecase  backspace=2
      9 set number     scrolloff=5   splitbelow      splitright
     10 set hlsearch   incsearch     ignorecase      smartcase
     11 set autoindent smarttab      shiftwidth=0    tabstop=4
     12 set nowrap     textwidth=72  linebreak       breakindent
     13 set mouse+=a   guioptions+=d highlight=Sn,su colorcolumn=73,81
     14 set viminfofile=$XDG_CACHE_HOME/vim/viminfo  nojoinspaces
     15 set list       listchars=tab:\:\ ,lead:.,trail:#,nbsp:%
     16 set ruler      rulerformat=%17(%l,%c%V%)%=`%B
     17 
     18 colorscheme elflord
     19 hi LineNr       ctermfg=DarkMagenta
     20 hi NonText      ctermfg=DarkBlue
     21 hi SpecialKey   ctermfg=DarkBlue
     22 hi ColorColumn  ctermbg=Black
     23 
     24 let g:netrw_home='$XDG_CACHE_HOME/vim/'
     25 let g:netrw_banner=0
     26 let g:netrw_liststyle=3
     27 let g:netrw_browse_split=3
     28 
     29 command VV  <mods>  new $MYVIMRC
     30 command VL  <mods>  new $MYVIMRCLOCAL
     31 command VimrcLocal  let $MYVIMRCLOCAL = expand('<sfile>:p:~')
     32 
     33 au BufReadPost *  exe "norm! g`\""
     34 
     35 noremap! kj     <esc>
     36 noremap Q       q:
     37 noremap <C-L>   :nohls<CR><C-L>
     38 noremap <C-W>v  :vnew<CR>
     39 noremap <C-J>   :bnext<CR>
     40 noremap <C-K>   :bprev<CR>
     41 noremap <C-N>   :cnext<CR>
     42 noremap <C-P>   :cprev<CR>
     43 
     44 let mapleader="\<space>"
     45 noremap <leader><tab>  :.term sh<CR>
     46 noremap <leader>q      :.!sh<CR>
     47 noremap <leader>r      :.r !
     48 noremap <leader>w      :.w !
     49 noremap <leader>f      :Files<CR>
     50 noremap <leader>b      :Buffers<CR>
     51 
     52 " Plugin Manager: junegunn/vim-plug
     53 if !filereadable(expand('~/.vim/autoload/plug.vim')) | finish | endif
     54 call plug#begin('~/.vim/plugged')
     55 Plug 'https://github.com/junegunn/fzf.git', { 'do': { -> fzf#install() } }
     56 Plug 'https://github.com/junegunn/fzf.vim.git'
     57 Plug 'https://github.com/tpope/vim-surround.git'
     58 call plug#end()
     59 let g:plug_window='0tabnew'
     60 
     61 " @torresjrjr