Skip to content

cirnovsky/vim-gotoword

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-gotoword

Helix-style word jumping for Vim.

vim-gotoword overlays two-letter tags on words visible in the current window, waits for a two-key input, then jumps your cursor to the selected target.

demo

Features

  • Fast in-window navigation with a single command: :GotoWord
  • Two-letter labels rendered directly in the visible text
  • Fold-aware rendering (closed folds are preserved)

Installation

Use your preferred plugin manager.

vim-plug:

Plug 'cirnovsky/vim-gotoword'

packer.nvim:

use 'cirnovsky/vim-gotoword'

Usage

Add a mapping:

nnoremap gw <cmd>GotoWord<CR>

Then:

  1. Trigger gw (or run :GotoWord directly).
  2. Type the 2-character label shown on the target word.
  3. Cursor jumps to that word.

Command

  • :GotoWord: start jump mode for the current window.

Highlight group

You can customize labels with global options:

" GUI
" Accepts hex color
let g:gotoword_guifg = '#cdd6f4'
let g:gotoword_guibg = '#313244'

" Terminal
" Accepts color number only
let g:gotoword_ctermfg = 'White'
let g:gotoword_ctermbg = 'DarkBlue'

" Font attribute
" bold, underline, reverse, italic, NONE, etc.
let g:gotoword_gui = 'underline'
let g:gotoword_cterm = 'underline'

Known issues

  • The plugin rewrites visible buffer text temporarily, then undoes it. So it has potentially risk of destructing your content, if the plugin or VIM close unexpectedly.

Help

After installation, see Vim help:

:help gotoword

About

A Helix goto-word like navigation plugin for Vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages