update vimrc

This commit is contained in:
Mira 2023-11-07 21:58:38 -05:00
parent 78910e2d9c
commit 65d364c98e
2 changed files with 166 additions and 64 deletions

View 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

View file

@ -12,31 +12,85 @@ endif
set laststatus=2 "lightline requires it? set laststatus=2 "lightline requires it?
"Setup Plugins "Setup Plugins
call plug#begin() call plug#begin()
Plug 'junegunn/goyo.vim'
Plug 'francoiscabrol/ranger.vim' "*********************
Plug 'rbgrouleff/bclose.vim' " General Plugins
Plug 'airblade/vim-gitgutter' "may cause lag "*********************
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
"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 " Line
Plug 'itchyny/lightline.vim' Plug 'itchyny/lightline.vim'
Plug 'cespare/vim-toml'
"pywal " LSP Server
if has('wal') Plug 'autozimu/LanguageClient-neovim', {
Plug 'dylanaraps/wal.vim' \ 'branch': 'next',
endif \ 'do': 'bash install.sh',
\ }
" FZF
Plug 'junegunn/fzf'
" Async.vim - backport nvim async to vim
Plug 'prabirshrestha/async.vim'
"Auto add delimiters "Auto add delimiters
Plug 'Raimondi/delimitMate' Plug 'Raimondi/delimitMate'
"Linting "Linting
Plug 'dense-analysis/ale' "Plug 'dense-analysis/ale'
" Commenting " Commenting
Plug 'tpope/vim-commentary' 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 " c
Plug 'vim-scripts/c.vim', {'for': ['c', 'cpp']} 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 " latex
if has('nvim') if has('nvim')
@ -48,46 +102,29 @@ if has('nvim')
let g:tex_conceal='abdmg' let g:tex_conceal='abdmg'
endif 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
"" Python Bundle
Plug 'davidhalter/jedi-vim', {'for': 'python' } Plug 'davidhalter/jedi-vim', {'for': 'python' }
Plug 'raimon49/requirements.txt.vim', {'for': 'requirements'} 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 " rust
" Vim racer " Code completion for rust using Racer
Plug 'racer-rust/vim-racer', {'for': 'rust'} Plug 'racer-rust/vim-racer', {'for': 'rust'}
" Rust.vim
Plug 'rust-lang/rust.vim', {'for': 'rust'} Plug 'rust-lang/rust.vim', {'for': 'rust'}
" Async.vim
Plug 'prabirshrestha/async.vim'
" Vim lsp
Plug 'prabirshrestha/vim-lsp'
if has('nvim') if has('nvim')
" Asyncomplete.vim Plug 'simrat39/rust-tools.nvim', {'for': 'rust'}
Plug 'prabirshrestha/asyncomplete.vim' Plug 'Saecki/crates.nvim', {'for': 'rust'}
" Asyncomplete lsp.vim
Plug 'prabirshrestha/asyncomplete-lsp.vim'
endif endif
" toml
Plug 'cespare/vim-toml'
" typescript " typescript
Plug 'leafgarland/typescript-vim', {'for': 'typescript'} Plug 'leafgarland/typescript-vim', {'for': 'typescript'}
Plug 'HerringtonDarkholme/yats.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-fugitive'
Plug 'tpope/vim-rhubarb' " required by fugitive to :Gbrowse Plug 'tpope/vim-rhubarb' " required by fugitive to :Gbrowse
"Copy using OSC52
Plug 'ojroques/vim-oscyank', {'branch': 'main'}
call plug#end() 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)')) autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC \| PlugInstall --sync | source $MYVIMRC
\| endif \| endif
" OSCYank setup
if exists('##TextYankPost') if exists('##TextYankPost')
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | execute 'OSCYankVisual"' | endif autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | execute 'OSCYankVisual"' | endif
endif endif
try
colorscheme wal " status line
catch /^Vim\%((\a\+)\)\=:E185/ set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\
try if exists("*fugitive#statusline")
colorscheme catppuccin set statusline+=%{fugitive#statusline()}
let g:lightline = {'colorscheme': 'catppuccin'} endif
catch /^Vim\%((\a\+)\)\=:E185/
endtry " Goyo Keybind
endtry map <leader>g :Goyo \| set linebreak<CR>
"set notermguicolors
"****************
" Vim Setup
"****************
set nocompatible set nocompatible
filetype on filetype on
filetype plugin on filetype plugin on
filetype indent on filetype indent on
syntax on syntax on " syntax higlighting
set hidden "enable hidden buffers
set noshowmode "conflicts with airline set noshowmode "conflicts with airline
set mouse=a "mouse anywhere set mouse=a "mouse anywhere
set number "line numbers set number "line numbers
@ -133,13 +179,17 @@ set hlsearch "highlight search
set ignorecase "case insensitive? set ignorecase "case insensitive?
set smartcase "only case insensitive for lowercase set smartcase "only case insensitive for lowercase
set incsearch set incsearch
set showmatch " show matching brace set showmatch " show matching brace
" indentations
set autoindent "auto indent set autoindent "auto indent
set smartindent "smart indent set smartindent "smart indent
set expandtab
set tabstop=4 set tabstop=4
set shiftwidth=4 set shiftwidth=4
set softtabstop=0
set ruler set ruler
set expandtab
" Autocomplete " Autocomplete
set wildmode=longest:list:full set wildmode=longest:list:full
set wildmenu set wildmenu
@ -154,10 +204,14 @@ cmap w!! !sudo tee % > /dev/null
nnoremap n nzzzv nnoremap n nzzzv
nnoremap N Nzzzv nnoremap N Nzzzv
" status line "" no one is really happy until you have this shortcuts
set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\ cnoreabbrev W! w!
if exists("*fugitive#statusline") cnoreabbrev Q! q!
set statusline+=%{fugitive#statusline()} cnoreabbrev Qall! qall!
endif cnoreabbrev Wq wq
cnoreabbrev Wa wa
map <leader>g :Goyo \| set linebreak<CR> cnoreabbrev wQ wq
cnoreabbrev WQ wq
cnoreabbrev W w
cnoreabbrev Q q
cnoreabbrev Qall qall