Giter VIP home page Giter VIP logo

nvim's Introduction

Neovim configuration

for an effective workflow on any machine (even headless)

The configuration is written in Lua as are most of the used plugins.

Config is based on but extended, modified and refactored

[TOC]

What is Neo(vim)

Neovim hyperextensible Vim-based text editor. It has Lua built-in functionality and 30% less source-code than Vim. This enables features on the command line that definitely improve your workflow on the command line and save you a ton of time. No other editor can compare.

Why should I use it?

  1. Vim is a good, fast text editor.
  2. IDEs are usually very practical for one or a couple of languages. So if you code in a different language, you will have to get familiar with a whole different setup. Neovim is highly extensible, and you can set it up for any language.
  3. It works on the command line on any machine, also on headless machines e.g. HPC.
  4. It is open source, free (both beer and freedom) and does not collect your telemetry data.
  5. etc.

Setup

Minimal setup includes

If you want more functionality checkout

Dependencies

  • neovim >=0.5 and its install requirements (check neovim build instructions)
  • git (if it is an old version you may need to tweak packer.nvim config, check their GH)

Optional

  • A patched font on the machine that is rendering your output (best install NerdFonts)
  • fzf (for good fuzzy file finding)
  • rg (for text matching, requires rust)
  • sqlite3 (for database conns)
  • python3 with pynvim package

How to start using it

  • The entry barrier can be quite high. If you are new to Vim, I recommend start you start with the vimtutor. Open neovim nvim and type :Tutor.
  • Once you are familiar with vim movements and basic editing commands, you NEED to read vim-galore
  • Start by only using it for basic tasks. Once you can move around, explore more functionality. Plugins are listed in plugins.lua
  • Have a look at the command list and implement nvim-telescope to find and open files. Once that is implemented, move on.
  • Explore the config and feel free to add/remove/change anything you want.

Some Keymaps

  • Get familiar with the usual vim keys.
  • Keymaps specific to this config can be found in here and here.
  • The leader key (space for us) opens up a menu, that shows you some commands.
  • Some mappings are listed below but the source of truth will be the above mentioned file.

Mnemonics of vim

  • vim aims to make you use your whole keyboard but mostly the keys on your home row.
  • vim commands follow a system (most of the time) An example:
  • Think of the first letter of the action you want to perform e.g. d = delete. Think of the first letter of the the word describing where you want to perform the action (mostly i = in or a = around, t = 'til). Think of the subject for the action e.g. w = word, p = paragraph, l = letter. Ergo diw = delete in word. Another way is to use motion commands, instead of location and subject. This is how you perform basic actions.

The mnemomics for this config should extend that way of thinking. Say you want to fuzzy find a file in your curretn project and open it in vertical split (nvim-telescope). In normal mode, hit leader (space) to activate your personal mode. Think of the first letter of the action you want to perform (s = search). Think of the thing you want to search (f = file, s = symbols, t = text (grep), p = projects). space-sf will put you in file search mode. Use Ctrl-n/p to go to next/prev item in the list. Once you have a file selected, you can open it (Enter) in vertical split (Ctrl-v) or in horizontal split (Ctrl-x). This plugin can find literally anything for you. Here are some examples: Files, Text (grep, using ripgrep), Document/Workspace symbols (like tags but better, needs LSP or treesitter), git commits, git branches, items in your quickfix list, old files (recent files), marks, manpages (help), colorschemes, diagnostic errors (needs LSP).

TODO

  • find best, minimal setup
  • ship some patched fonts
  • handle installation of dependencies
  • figure out how to ship globally

nvim's People

Contributors

benatouba avatar tubtogra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.