update vimrc
This commit is contained in:
parent
78910e2d9c
commit
65d364c98e
2 changed files with 166 additions and 64 deletions
48
private_dot_config/vim/vim.md
Normal file
48
private_dot_config/vim/vim.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# General Plugins
|
||||
## [Goyo] (https://github.com/junegunn/goyo.vim)
|
||||
- TODO
|
||||
|
||||
## [Easymotion] (https://github.com/easymotion/vim-easymotion)
|
||||
- `\\w` lets you jump to any word ahead
|
||||
- `\\b` is backwards
|
||||
- `\\{h,j,k,l}` jump in a direction (doesn't work with arrow keys)
|
||||
- `\\f<char>` lets you jump to instances of `<char`
|
||||
|
||||
## [Ranger] (https://github.com/francoiscabrol/ranger.vim)
|
||||
- Requires ranger to be installed
|
||||
- `\f` to open ranger
|
||||
- `:RangerNewTab` to open selected file in new tab
|
||||
|
||||
## [Signify] (https://github.com/mhinz/vim-signify)
|
||||
- TODO
|
||||
|
||||
## [Lightline] (https://github.com/itchyny/lightline.vim)
|
||||
- TODO
|
||||
|
||||
## [DelimitMate] (https://github.com/Raimondi/delimitMate)
|
||||
- TODO
|
||||
|
||||
## [LanguageClient] (https://github.com/autozimu/LanguageClient-neovim)
|
||||
- TODO
|
||||
|
||||
## [Commentary] (https://github.com/tpope/vim-commentary)
|
||||
- `gcc`: toggle comment line
|
||||
- `gc<motion>`: toggle comment on motion
|
||||
|
||||
## [NerdTree] ()
|
||||
- TODO
|
||||
|
||||
## [NerdTree Tabs] ()
|
||||
- TODO
|
||||
|
||||
## [Grep] ()
|
||||
- TODO
|
||||
|
||||
## [CSApprox] ()
|
||||
- TODO
|
||||
|
||||
## [Tagbar] ()
|
||||
- TODO
|
||||
|
||||
## [indentline] ()
|
||||
- TODO
|
|
@ -12,31 +12,85 @@ endif
|
|||
set laststatus=2 "lightline requires it?
|
||||
"Setup Plugins
|
||||
call plug#begin()
|
||||
Plug 'junegunn/goyo.vim'
|
||||
Plug 'francoiscabrol/ranger.vim'
|
||||
Plug 'rbgrouleff/bclose.vim'
|
||||
Plug 'airblade/vim-gitgutter' "may cause lag
|
||||
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
|
||||
|
||||
"*********************
|
||||
" General Plugins
|
||||
"*********************
|
||||
|
||||
"distraction free writing
|
||||
Plug 'junegunn/goyo.vim'
|
||||
|
||||
"ranger - file manager
|
||||
Plug 'francoiscabrol/ranger.vim'
|
||||
|
||||
" Easymotion
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
let g:EasyMotion_smartcase = 1
|
||||
|
||||
" Signify - show vcs changes
|
||||
if has('nvim') || has('patch-8.0.902')
|
||||
Plug 'mhinz/vim-signify'
|
||||
set updatetime=100
|
||||
else
|
||||
Plug 'mhinz/vim-signify', { 'tag': 'legacy' }
|
||||
endif
|
||||
|
||||
" Line
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'cespare/vim-toml'
|
||||
"pywal
|
||||
if has('wal')
|
||||
Plug 'dylanaraps/wal.vim'
|
||||
endif
|
||||
|
||||
" LSP Server
|
||||
Plug 'autozimu/LanguageClient-neovim', {
|
||||
\ 'branch': 'next',
|
||||
\ 'do': 'bash install.sh',
|
||||
\ }
|
||||
|
||||
" FZF
|
||||
Plug 'junegunn/fzf'
|
||||
|
||||
" Async.vim - backport nvim async to vim
|
||||
Plug 'prabirshrestha/async.vim'
|
||||
|
||||
"Auto add delimiters
|
||||
Plug 'Raimondi/delimitMate'
|
||||
|
||||
"Linting
|
||||
Plug 'dense-analysis/ale'
|
||||
"Plug 'dense-analysis/ale'
|
||||
|
||||
" Commenting
|
||||
Plug 'tpope/vim-commentary'
|
||||
|
||||
"Copy using OSC52
|
||||
Plug 'ojroques/vim-oscyank', {'branch': 'main'}
|
||||
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'jistr/vim-nerdtree-tabs'
|
||||
Plug 'vim-scripts/grep.vim'
|
||||
Plug 'vim-scripts/CSApprox'
|
||||
Plug 'majutsushi/tagbar'
|
||||
Plug 'Yggdroot/indentLine'
|
||||
|
||||
|
||||
|
||||
"*********************
|
||||
" Language Specific
|
||||
"*********************
|
||||
|
||||
" c
|
||||
Plug 'vim-scripts/c.vim', {'for': ['c', 'cpp']}
|
||||
Plug 'ludwig/split-manpage.vim'
|
||||
|
||||
" go
|
||||
Plug 'fatih/vim-go', {'do': ':GoInstallBinaries', 'for': 'go'}
|
||||
|
||||
" html
|
||||
Plug 'hail2u/vim-css3-syntax', {'for': ['html','css']}
|
||||
Plug 'gko/vim-coloresque'
|
||||
Plug 'skammer/vim-css-color'
|
||||
Plug 'tpope/vim-haml', {'for': 'html'}
|
||||
Plug 'mattn/emmet-vim', {'for': 'html'}
|
||||
|
||||
" javascript
|
||||
"" Javascript Bundle
|
||||
Plug 'jelera/vim-javascript-syntax'
|
||||
|
||||
" latex
|
||||
if has('nvim')
|
||||
|
@ -48,46 +102,29 @@ if has('nvim')
|
|||
let g:tex_conceal='abdmg'
|
||||
endif
|
||||
|
||||
" haskell
|
||||
"" Haskell Bundle
|
||||
Plug 'eagletmt/neco-ghc', {'for': 'haskell'}
|
||||
Plug 'dag/vim2hs', {'for': 'haskell'}
|
||||
Plug 'pbrisbin/vim-syntax-shakespeare', {'for': 'haskell'}
|
||||
|
||||
|
||||
" html
|
||||
"" HTML Bundle
|
||||
Plug 'hail2u/vim-css3-syntax', {'for': ['html','css']}
|
||||
Plug 'gko/vim-coloresque'
|
||||
Plug 'skammer/vim-css-color'
|
||||
Plug 'tpope/vim-haml', {'for': 'html'}
|
||||
Plug 'mattn/emmet-vim', {'for': 'html'}
|
||||
" python
|
||||
"" Python Bundle
|
||||
Plug 'davidhalter/jedi-vim', {'for': 'python' }
|
||||
Plug 'raimon49/requirements.txt.vim', {'for': 'requirements'}
|
||||
|
||||
" ruby
|
||||
Plug 'tpope/vim-rails'
|
||||
Plug 'tpope/vim-rake'
|
||||
Plug 'tpope/vim-projectionist'
|
||||
Plug 'thoughtbot/vim-rspec'
|
||||
Plug 'ecomba/vim-ruby-refactoring', {'tag': 'main'}
|
||||
|
||||
" rust
|
||||
" Vim racer
|
||||
" Code completion for rust using Racer
|
||||
Plug 'racer-rust/vim-racer', {'for': 'rust'}
|
||||
|
||||
" Rust.vim
|
||||
Plug 'rust-lang/rust.vim', {'for': 'rust'}
|
||||
|
||||
" Async.vim
|
||||
Plug 'prabirshrestha/async.vim'
|
||||
|
||||
" Vim lsp
|
||||
Plug 'prabirshrestha/vim-lsp'
|
||||
|
||||
if has('nvim')
|
||||
" Asyncomplete.vim
|
||||
Plug 'prabirshrestha/asyncomplete.vim'
|
||||
|
||||
" Asyncomplete lsp.vim
|
||||
Plug 'prabirshrestha/asyncomplete-lsp.vim'
|
||||
Plug 'simrat39/rust-tools.nvim', {'for': 'rust'}
|
||||
Plug 'Saecki/crates.nvim', {'for': 'rust'}
|
||||
endif
|
||||
|
||||
" toml
|
||||
Plug 'cespare/vim-toml'
|
||||
|
||||
" typescript
|
||||
Plug 'leafgarland/typescript-vim', {'for': 'typescript'}
|
||||
Plug 'HerringtonDarkholme/yats.vim', {'for': 'typescript'}
|
||||
|
@ -96,34 +133,43 @@ Plug 'HerringtonDarkholme/yats.vim', {'for': 'typescript'}
|
|||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-rhubarb' " required by fugitive to :Gbrowse
|
||||
|
||||
"Copy using OSC52
|
||||
Plug 'ojroques/vim-oscyank', {'branch': 'main'}
|
||||
call plug#end()
|
||||
|
||||
" Run PlugInstall if there are missing plugins
|
||||
"****************
|
||||
" Plugin Setup
|
||||
"****************
|
||||
|
||||
" Run PlugInstall Vif there are missing plugins
|
||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||
\| PlugInstall --sync | source $MYVIMRC
|
||||
\| endif
|
||||
|
||||
" OSCYank setup
|
||||
if exists('##TextYankPost')
|
||||
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | execute 'OSCYankVisual"' | endif
|
||||
endif
|
||||
|
||||
try
|
||||
colorscheme wal
|
||||
catch /^Vim\%((\a\+)\)\=:E185/
|
||||
try
|
||||
colorscheme catppuccin
|
||||
let g:lightline = {'colorscheme': 'catppuccin'}
|
||||
catch /^Vim\%((\a\+)\)\=:E185/
|
||||
endtry
|
||||
endtry
|
||||
"set notermguicolors
|
||||
|
||||
" status line
|
||||
set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\
|
||||
if exists("*fugitive#statusline")
|
||||
set statusline+=%{fugitive#statusline()}
|
||||
endif
|
||||
|
||||
" Goyo Keybind
|
||||
map <leader>g :Goyo \| set linebreak<CR>
|
||||
|
||||
|
||||
"****************
|
||||
" Vim Setup
|
||||
"****************
|
||||
|
||||
set nocompatible
|
||||
filetype on
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
syntax on
|
||||
syntax on " syntax higlighting
|
||||
set hidden "enable hidden buffers
|
||||
set noshowmode "conflicts with airline
|
||||
set mouse=a "mouse anywhere
|
||||
set number "line numbers
|
||||
|
@ -133,13 +179,17 @@ set hlsearch "highlight search
|
|||
set ignorecase "case insensitive?
|
||||
set smartcase "only case insensitive for lowercase
|
||||
set incsearch
|
||||
|
||||
set showmatch " show matching brace
|
||||
" indentations
|
||||
set autoindent "auto indent
|
||||
set smartindent "smart indent
|
||||
set expandtab
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set softtabstop=0
|
||||
|
||||
set ruler
|
||||
set expandtab
|
||||
" Autocomplete
|
||||
set wildmode=longest:list:full
|
||||
set wildmenu
|
||||
|
@ -154,10 +204,14 @@ cmap w!! !sudo tee % > /dev/null
|
|||
nnoremap n nzzzv
|
||||
nnoremap N Nzzzv
|
||||
|
||||
" status line
|
||||
set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\
|
||||
if exists("*fugitive#statusline")
|
||||
set statusline+=%{fugitive#statusline()}
|
||||
endif
|
||||
|
||||
map <leader>g :Goyo \| set linebreak<CR>
|
||||
"" no one is really happy until you have this shortcuts
|
||||
cnoreabbrev W! w!
|
||||
cnoreabbrev Q! q!
|
||||
cnoreabbrev Qall! qall!
|
||||
cnoreabbrev Wq wq
|
||||
cnoreabbrev Wa wa
|
||||
cnoreabbrev wQ wq
|
||||
cnoreabbrev WQ wq
|
||||
cnoreabbrev W w
|
||||
cnoreabbrev Q q
|
||||
cnoreabbrev Qall qall
|
Loading…
Add table
Reference in a new issue