123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- " "
- " A VIMRC FOR THE MODERN ERA "
- " "
- " author'd: jwdashel "
- " created: 8/24/2020; spokane valley, wa "
- " "
- " "
- " notes: assembled from ghosts of vimrcs past "
- " to them, i pay my respects "
- " "
- " "
- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- """""""""""
- " GIVEN TWEAKS
- " adjustments to make vim sane
- "
- set nocompatible
- syntax on
- set nostartofline
- set visualbell
- set mouse=""
- set cmdheight=2
- set history=1000
- set timeout timeoutlen=5000 ttimeoutlen=100
- set showcmd
- "" files
- set hidden
- set wildmenu
- set wildmode=longest,list
- set confirm
- filetype indent on
- filetype plugin on
- au! BufNewFile,BufRead *.fish setf fish
- "" swp files
- set noswapfile
- set nobackup
- set nowritebackup
- "" insert mode
- set backspace=indent,eol,start
- "" normal mode
- map Y y$
- nnoremap j gj
- nnoremap k gk
- nnoremap q<Space> q:
- "" visual mode
- vmap > >gv
- vmap < <gv
- "" statusline
- set ruler
- set laststatus=2
- "" search
- set hlsearch
- set ignorecase
- set smartcase
- set incsearch
- "
- """""""""""""""""""""""""""""
- """""""""""
- " VISUAL TWEAKS
- " adjustments to make vim pretty
- "
- set number
- set relativenumber
- set scrolloff=5
- set cursorline
- hi CursorLine ctermbg=15 term=none cterm=none
- hi Visual ctermbg=11 term=none cterm=none
- hi LineNr ctermfg=8 term=none cterm=none
- hi CursorLineNr ctermfg=13 term=none cterm=none
- hi Error ctermfg=8 ctermbg=10
- "
- """""""""""""""""""""""""""""
- """""""""""
- " FUNCTIONAL TWEAKS
- " adjustments to make vim useful
- "
- "" normal mode
- nnoremap <Space> :
- let mapleader="_"
- nmap <leader>w :set list!<CR>
- nmap <leader>n :NERDTreeToggle<CR>
- "" instert mode
- set autoindent
- set smartindent
- set smarttab
- "
- """""""""""""""""""""""""""""
- """""""""""
- " PLUGINS
- "
- call plug#begin('~/.vim/plugged')
- Plug 'tpope/vim-surround'
- Plug 'tpope/vim-fugitive'
- Plug 'tpope/vim-unimpaired'
- Plug 'tpope/vim-eunuch'
- Plug 'tpope/vim-speeddating'
- Plug 'tpope/vim-commentary'
- Plug 'preservim/nerdtree'
- Plug 'vim-scripts/taglist.vim'
- Plug 'itchyny/lightline.vim'
- Plug 'michaeljsmith/vim-indent-object'
- Plug 'easymotion/vim-easymotion'
- Plug 'mileszs/ack.vim'
- Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
- Plug 'junegunn/fzf.vim'
- Plug 'mike-hearn/vim-combosearch'
- call plug#end()
- """""""""""
- " PLUGIN CONFIGURE
- let g:lightline = {
- \ 'colorscheme': 'Tomorrow' ,
- \ 'active': {
- \ 'left': [ [ 'mode', 'paste' ],
- \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ],
- \ 'right': [ [ 'lineinfo' ],
- \ [ 'percent' ],
- \ [ 'fileformat', 'fileencoding', 'filetype', 'bufnum' ] ]
- \ },
- \ 'component': {
- \ 'bufnum': 'b%n'
- \ },
- \ 'component_function': {
- \ 'gitbranch': 'FugitiveHead'
- \ },
- \ }
- hi EasyMotionTarget2Second ctermfg=DarkRed ctermbg=none
- hi EasyMotionTarget2First ctermfg=DarkRed ctermbg=none
- nnoremap <C-b> :Buffers<CR>
- nnoremap <C-f> :Files<CR>
- nnoremap <C-p> :ComboSearch<CR>
- "
- """""""""""""""""""""""""""""
|