Skip to content

Text editor

Tsuyoshi Tokuda edited this page Oct 1, 2023 · 26 revisions

I use Neovim as a default editor.

The programming languages I use in my daily life are JavaScript and TypeScript and lately learning Go, too. Therefore, my vim setup supports these technologies.

Requirements

Commands

List of frequently used plugin commands:

Mason

  • :Mason: Open up the mason.nvim's dashboard.
  • :MasonUpdate: Update all installed packages.

Packer

  • :PackerCompile: Regenerate compiled loader file.
  • :PackerInstall: Clean, then install missing plugins.
  • :PackerUpdate: Clean, then update and install plugins.
  • :PackerClean: Remove any disabled or unused plugins.

Tree-sitter

  • :TSUpdate: Update all parsers.

Bindings

Window navigations

Mapping Action
<leader> + hjkl Move window

Key bindings for vim operations

Mode Mapping Action
I ⌥ + hjkl Cursor movement in the insert mode

Key bindings for plugins

Mode Mapping Plugin Action
N ff telescope.nvim Open file finder
N fl telescope.nvim Open file finder with live grep
N fb telescope-file-browser.nvim Open file browser
N ft neo-tree.nvim Open the filer as floating UI
N fg neo-tree.nvim Open the filer for listing git unstaged files
N FF hop.nvim Show hints to jump any words
N Fc hop.nvim Show hints to jump by input keywords
N Fl hop.nvim Show hints to jump any lines
N gd nvim-lspconfig. Go to definition
N / V gcc Comment.nvim Toggle comment for the current line
I / V <C-e>, emmet-vim Expand abbreviation

Syntax highlight

I use Tree-sitter which gives better syntax highlighting.

Language Server Protocol

Filer

Key bindings on filer UI

I align the UI operations of neo-tree.nvim, telescope.nvim, etc. It is basically based on the default mappings of telescope.nvim.

Mapping Action
<C-n> Move to next item
<C-p> Move to previous item
<C-t> Open a file in a new tab
<C-c> Close window
<C-h> Open a file in a new horizontal split
<C-v> Open a file in a new vertical split