- ShrikeVim
- Why another Vim distribution
- What is ShrikeVim
- Dependencies
- Installation
- Configuration
- FZF
- lazygit
- Overriding configuration
- Plugins
- Extra functions
- LSP
- Default plugins
- Keybindings
- Features
- Known issues
- Cursor line gets lost
- Roadmap
First of all, most of "Vim" distros, are Neovim distros. ShrikeVim is an actual Vim distribution (if we want to call it like this).
Most of these distributions are pretty complex, and happen to be a pain to actually replace some base plugins.
ShrikeVim is meant to be simple. It uses vim-plug as plugin manager, which is also wrapped in shrike#add, shrike#remove and shrike#init functions, which allows full control over what plugins from base set are actually used.
ShrikeVim comes with sane (or maybe opinionated?) defaults and utilities to make your vimrc as small and readable as possible.
ShrikeVim comes with kyotonight.vim theme, which might easily be changed to any theme of your choice. There is also a plan of adding a possibility to create your own colorscheme providing just color palette.
ShrikeVim uses fzf which powers all the fuzzy finding in the default config. Check the recommended config section for FZF.
ShrikeVim uses nnn as file picker and file browser in place of netrw, it also doesn't provide any file-tree plugin.
Rationale for this choices is just... keeping it simple. Use the same tools inside of Vim which you would use outside of Vim. Fzf is great all around fuzzy finder. Nnn is a full blown, fully functional file manager. No file browser plugin can compare with that. And again, it's a tool for everyday use, not just in Vim.
If you prefer different workflow, replacing nnn.vim with a file-tree plugin of
choice is just removing one plugin, adding another one, and replacing 2 remaps.
You can also add a file-tree plugin on top of nnn, so you might just want to
replace only one remap, <C-n>
with toggling your file-tree.
ShrikeVim comes with vim-fugitive, but it's solely for hunks in lightline.
Intended git workflow is using lazygit in a kitty, tmux or Vim terminal pane
opened by <leader>gg
keybinding. It follows the same rationale of using tools
usable outside of Vim, but you can easily install / use your preferred plugin
for git, as the actual lazygit integration in ShrikeVim is this single
keybinding for opening lazygit in current working directory. There's no plugin
for that in the base set.
In the end, you might always take parts of ShrikeVimRc as inspiration for making your own config, which is also a valid use case for this little project. :)
- NerdFont
- Fzf (All the fuzzy finding)
- ripgrep (For Fzf default config in ShrikeVim)
- fd (Also for Fzf)
- npm (For coc.nvim)
- kitty or tmux (optional)
- lazygit (For... lazygit integration)
- python3 (Ultisnips)
Install vim-plug first:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Install ShrikeVimRc:
curl -fLo ~/.vim/autoload/shrike.vim --create-dirs \
https://raw.githubusercontent.com/shrikecode/shrike.vim/main/autoload/shrike.vim
To use the default ShrikeVimRc just add this line to your .vimrc:
call shrike#init()
Recommended options for fzf are as follows:
# fzf default command
export FZF_DEFAULT_COMMAND="rg -g '!{.git,node_modules,.composer}/' --hidden --no-ignore -l ''"
# fzf theming
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS' --color=fg:#a9b1d6,bg:#1a1b26,hl:#7aa2f7 --color=fg+:#c0caf5,bg+:#1a1b26,hl+:#7dcfff --color=info:#cfc9c2,prompt:#f7768e,pointer:#bb9af7 --color=marker:#9ece6a,spinner:#bb9af7,header:#73daca'
You should put it in your shell configuration (.bashrc/.zshrc or .profile/.zshenv)
If Vim is started by -e
option of terminal emulator, it might not inherit your
shell env, so you might need to add the same options in your .vimrc:
let $FZF_DEFAULT_COMMAND = "rg -g '!{.git,node_modules,.composer}/' --hidden --no-ignore -l ''"
let $FZF_DEFAULT_OPTS = '--color=fg:#a9b1d6,bg:#1a1b26,hl:#7aa2f7 --color=fg+:#c0caf5,bg+:#1a1b26,hl+:#7dcfff --color=info:#cfc9c2,prompt:#f7768e,pointer:#bb9af7 --color=marker:#9ece6a,spinner:#bb9af7,header:#73daca'
Should you want to customize your fzf theme, e.g. to match colorscheme you've chosen instead of the default kyotonight.vim (why would you do that? :( ) check out this site.
Only thing that is needed here is having lazygit installed. The <leader>gg
keybinding pulls up a pane with lazygit in current working directory.
To override default ShrikeVim configuration... just set your configuration changes after calling shrike#init function. That includes plugin configurations.
To remove a plugin:
call shrike#remove('plugin/name')
Add a plugin:
call shrike#add('plugin/name', {'branch': 'master'}) " optional params
These functions need to be called BEFORE shrike#init.
- shrike#run - opens a split in kitty or tmux, running a supplied command in current working directory, or if no command is supplied it just opens the terminal. If Vim is run in an unsupported terminal, it just opens Vim terminal
-
Examples
" Run lazygit in current working directory nnoremap <silent><leader>gg <Cmd>call shrike#run("lazygit -p")<CR> " Open terminal in current working directory nnoremap <silent><leader>tt <Cmd>call shrike#run()<CR>
ShrikeVim provides a choice to include CoC. To use it, put this BEFORE
calling shrike#init
function:
let g:shrike#use_coc = 1
ShrikeVim also provides its custom CoC diagnostics support for lightline.
- shrikecode/kyotonight.vim
- shrikecode/skeleton.vim
- tpope/vim-abolish
- tpope/vim-vinegar
- leafOfTree/vim-project
- lambdalisue/suda.vim
- tpope/vim-commentary
- mbbill/undotree
- ryanoasis/vim-devicons
- BourgeoisBear/clrzr
- mhinz/vim-startify
- itchyny/lightline.vim
- mengelbrecht/lightline-bufferline
- sineto/lightline-hunks
- airblade/vim-gitgutter
- junnegunn/fzf.vim
- tpope/vim-fugitive
- junegunn/vim-peekaboo
- machakann/vim-highlightedyank
- honza/vim-snippets
- neoclice/coc.nvim
Check shrike#mappings() function, and also review some of the default mappings of listed plugins.
Some of them might've been borrowed from NvChad or ThePrimeagen.
- Dashboard with useful shortcuts
- Good looking, easy on the eyes theme
- Code commenting plugins
- Simple project management
- Privilege elevating when editing system config
- Fuzzy finder
- Fancy yet useful status and bufferline
- Autocompletion and snippets
- LSP support
- Undotree
- Better file manager
- Easy shortcuts to lazygit and full fledged terminal (kitty or tmux required)
- Auto-save
- Easy to configure remote sync
- Better search and replace
- Color strings highlighting
- Clipboard history picker
For some reason nocursorline
option gets set sometimes. I haven't tracked
the issue yet. A workaround (if you want cursorline that is) is adding following
autocmd to your init.vim:
autocmd FileType * if &ft != 'startify' && &ft != 'dashboard' | :set cursorline | endif
- Add screenshots
- Documentation (and default keybindings info)
- Figure out a way for vim-plug to manage ShrikeVimRc or let it manage itself
- Features explanation
- Add vim-signify / gitsigns support for lightline
- Dynamic theme plugin
- New installation method (bootstrap ShrikeVim and let vim-plug manage the full plugin)
- Remove all Neovim specific stuff