34

GitHub - GideonWolfe/vim.reaper: ? A Hackable, Fully Featured, Rice Friendly Neo...

 5 years ago
source link: https://github.com/GideonWolfe/vim.reaper
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

README.md

ascii.png

? A Hackable, Fully Featured, Rice Friendly Neovim Configuration ?

FeaturesInstallationUsageRequired Tools

68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f676964656f6e776f6c66652f76696d2e7265617065722e7376673f7374796c653d666c61742d737175617265266c6f676f3d6861636b61646179 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f676964656f6e776f6c66652f76696d2e7265617065722e7376673f7374796c653d666c61742d737175617265266c6f676f3d76696d

68747470733a2f2f73746172732e6d6564762e696f2f476964656f6e576f6c66652f76696d2e7265617065722e737667

Features

Installation

The update_config.sh script simply copies the nvim folder into your $HOME/.config directory. This script can also be used to update configurations that you have modified or have been updated from git.

Before installing for the first time, go into the vim.reaper/nvim directory and run nvim -u init.vim. This will tell neovim to launch using this configuration file. This lets you fully get everything up and running before you commit to puting it in .config. Back up any old configs!

Usage

Keybindings

Click to expand

Basic keybinds ?Function Keybind Leader Key SPACE Exit insert mode jk or kj

Editing ?Function Keybind NERDComment toggle comment <Leader>n NERDComment sexy comment <Leader>ns NERDComment append comment <Leader>na NERDComment uncomment <Leader>nu NERDComment comment <Leader>nc NERDComment invert <Leader>ni

Navigation ?Function Keybind Navigate to left window Ctrl+h Navigate to right window Ctrl+l Navigate to top window Ctrl+k Navigate to bottom window Ctrl+j Horizontal split then move to bottom window <Leader>+Ctrl+s Horizontal split then move to right window <Leader>+Ctrl+l Next tab Tab Previous tab Shift+Tab Kill buffer <Leader>bk Scroll up Ctrl+j or mouse scroll Scroll down Ctrl+k or mouse scroll

coc.nvim ?Function Keybind Open completion window Tab Accept completion Enter coc-definition <Leader>cd coc-type-definition <Leader>ctd coc-type-implementation <Leader>ci coc-references <Leader>cr coc-rename <Leader>crn coc-format-selected <Leader>cf coc-fix-current <Leader>cfl :CocList diagnostics <Leader>cdi :CocList extensions <Leader>ce :CocList commands <Leader>cc :CocList outline <Leader>co

git ?Function Keybind :Gstatus <Leader>gs :Gdiffsplit <Leader>gd :Gcommit <Leader>gc :Gpush <Leader>gp :Gpull <Leader>gP :Gmove <Leader>gm :Gmerge <Leader>gM :Gbrowse <Leader>gb :CocCommand git.browserOpen <Leader>gbl :CocCommand git.chunkInfo <Leader>gh :CocCommand git.showCommit <Leader>gsc :CocCommand git.toggleGutters <Leader>gg :ToggleLazyGit <Leader>lg

Translation ?Function Keybind :Translate <Leader>t :TranslateW <Leader>tw :TranslateR <Leader>tr

LaTeX ?Function Keybind :VimtexCompile <Leader>lc :VimtexCompileSelected <Leader>ls :VimtexInfo <Leader>li :VimtexTocToggle <Leader>lt :VimtexView <Leader>lv

Misc ?Function Keybind :ToggleLazyDocker <Leader>ld :MarkdownPreview <Leader>md

Check mappings.vim for a complete list of keybinds.

Startify

To open Neovim to the startify buffer, simply launch nvim without any arguments. Your recently edited files will be displayed, as well as recently edited files from the current directory.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f73746172746966792e706e673f

Completion

In the middle of a word, you can press Tab to open the Coc floating completion menu and cycle through options. This menu should be populated with sippets from UltiSnips, smart complete from TabNine, and any other completion suggestions. Press Shift+Tab to go up in the menu, and Enter to select an option.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f636f6d706c6574696f6e2e706e67

Note: Windows are set to the background color because the other colors look gross IMO. Ideally we could have a border on the floating windows but that is not implemented in CoC yet.

NERDTree

In any buffer, press F7 to open the NERDTree file browser. Optionally disable the nerdtree-highlights plugin if you don't want syntax highlighting in NT.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f6e657264747265652e706e67

Airline

Tabline

The tabline will display the currently open buffers, and whether they have been modified.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f7461626c696e652e706e67

Statusbar

The status bar displays the current editing mode, git hunks, git branch with branch status, the modified status of the buffer, the filename and filetype, the character encoding method, progress through file, and warnings/errors found by linter.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f7374617475736261722e706e67

Vista

I am still ironing out the kinks in my vista config (specifically with C files), but it should work pretty well for most filetypes. Press F8 to toggle the Vista window.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f76697374612e706e67

For quick location of tags, you can activate the Vista finder fuzzyfinder by pressing <Leader>ft

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f766973746166757a7a792e706e67

To navigate the fzf menu, you can type the name of the tag or use Ctrl+j or Ctrl+k

LazyGit and LazyDocker

LazyGit and LazyDocker give you a convenient TUI portal to your current git repo or docker stack. They can be brought up with <Leader>lg and <Leader>ld respectively.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f6c617a796769742e706e67

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f6c617a79646f636b65722e706e67

Translator

By default I set the target language to french. This option is configurable in the plugin-settings, plus a ton of other options for that plugin I'm not even using at the moment.

Here's what it looks like if you translate a phrase to a window with <Leader>tw.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f7472616e736c6174652e706e67

Markdown

While editing a markdown document, press <Leader>md to open a live preview of your document. You must edit the plugin settings to point to the absolute filepath of the css file. This shoud just mean changing the username.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f6d61726b646f776e2e706e67

If you are running pywal, your colors will be dynamically sourced!

LaTeX

While editing a LaTeX document, press <Leader>lc to start automatic compilation.

68747470733a2f2f676964656f6e776f6c66652e636f6d2f696d672f6e656f76696d2f7265617065722f6c617465782e706e67

use zathura pywal for the most cohesive theme!

Required tools

These must be installed to make use of all the awesome features

  • fzf to enable fuzzy finding
  • eslint npm package for coc-eslint (only for JavaScript)
  • ccls package for C/C++ language servers
  • OracleJDK or OpenJDK, version 8+ (only for Java)
  • git
  • coc.nvim npm package
  • pywal for colorscheme
  • neovim python module from pip
  • lazydocker for TUI docker management
  • lazygit for TUI git management

Notes

vim.reaper is only part of a balanced linux diet. Check out my dotfiles for more ricing goodness. Please feel free to let me know about any errors, or create PRs that expand the configuration or make it more robust on different systems.

68747470733a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f36302d70657263656e742d6f662d7468652d74696d652d776f726b732d65766572792d74696d652e737667


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK