Skip to content

Fast search and open aliases or imports in VIM

Notifications You must be signed in to change notification settings

guljeny/aliapath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Aliapath

Very fast way open relative and aliased imports in VIM.

Install plugin, place cursor on the line with path and type :OpenPath. That's all!

For more details see How it works.

Prewiew

Why is fast?

As search core there used The Silver Searcher which is defenetly fast 💫

Install

  • Install The Silver Searcher

    brew install the_silver_searcher

  • Install FZF vim plugin

    Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }

  • Install this plugin

    Plug 'guljeny/aliapath'

  • Enjoy 🔥

How it works

Place cursor on the line with path and type :OpenPath.

Plugin understand as path any string wrapped in ' or ".

Relative (starts from ./ or ../) and absolute (starts from /) paths will be open imediately.

If only one file with name (last part of path, baz in foo/bar/baz) found, this file will be opened.

If there some files with the same name (baz.js and baz.css) - you will see the file picker window.

  • Use CTRL-K / CTRL-J to navigate up / down in this window.
  • Use Enter to open file.
  • For more details check Using FZF docs.

Tips

Still slowly? Try to create alias?

map <leader>o :OpenPath<CR>

About

Fast search and open aliases or imports in VIM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published