Skip to content

Commit

Permalink
Remove *Virtual commands and update the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
hadronized committed Mar 6, 2021
1 parent 7f4e960 commit 5823339
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@ Neovim.
<!-- vim-markdown-toc GFM -->

* [Features](#features)
* [Word mode (`:HopWord`)](#word-mode-hopword)
* [Line mode (`:HopLine`)](#line-mode-hopline)
* [1-char mode (`:HopChar1`)](#1-char-mode-hopchar1)
* [2-char mode (`:HopChar2`)](#2-char-mode-hopchar2)
* [Pattern mode (`:HopPattern`)](#pattern-mode-hoppattern)
* [Visual extend](#visual-extend)
* [Jump on sole occurrence](#jump-on-sole-occurrence)
* [Word mode (`:HopWord`)](#word-mode-hopword)
* [Line mode (`:HopLine`)](#line-mode-hopline)
* [1-char mode (`:HopChar1`)](#1-char-mode-hopchar1)
* [2-char mode (`:HopChar2`)](#2-char-mode-hopchar2)
* [Pattern mode (`:HopPattern`)](#pattern-mode-hoppattern)
* [Visual extend](#visual-extend)
* [Jump on sole occurrence](#jump-on-sole-occurrence)
* [Getting started](#getting-started)
* [Disclaimer and experimental notice](#disclaimer-and-experimental-notice)
* [Installation](#installation)
* [Disclaimer and experimental notice](#disclaimer-and-experimental-notice)
* [Installation](#installation)
* [Special notes regarding extended marks and virtual text](#special-notes-regarding-extended-marks-and-virtual-text)
* [Usage](#usage)
* [Configuration](#configuration)

Expand Down Expand Up @@ -134,12 +135,25 @@ on.** However, PRs are greatly appreciated.

## Installation

Using [vim-plug](https://github.com/junegunn/vim-plug):
Using [vim-plug]:

```vim
Plug 'phaazon/hop.nvim'
```

### Special notes regarding extended marks and virtual text

Extended marks and virtual text is a very recent addition to Neovim-0.5. The feature is still experimental but so far no
bug related to them were found in Hop. However, if you would rather stick to the legacy implementation, you are advised
to pinpoint the `pre-extmarks` branch. For instance, with [vim-plug]:

```vim
Plug 'phaazon/hop.nvim', { 'branch': 'pre-extmarks' }
```

Keep in mind that this branch is provided as-is until Neovim bugs are fixed regarding extended marks (if any). I don’t
plan on maintaining this branch and it should be short-living.

# Usage

A bunch of vim commands are available to get your fingers wrapped around **Hop** quickly:
Expand Down Expand Up @@ -195,3 +209,4 @@ You can configure Hop via several different mechanisms:
hop-config` for a list of default values.

[EasyMotion]: https://github.com/easymotion/vim-easymotion
[vim-plug]: https://github.com/junegunn/vim-plug
5 changes: 0 additions & 5 deletions plugin/hop.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,18 @@ endif

" The jump-to-word command.
command! HopWord lua require'hop'.hint_words()
command! HopWordVisual lua require'hop'.hint_words({ extend_visual = true })

" The jump-to-pattern command.
command! HopPattern lua require'hop'.hint_patterns()
command! HopPatternVisual lua require'hop'.hint_patterns({ extend_visual = true })

" The jump-to-char-1 command.
command! HopChar1 lua require'hop'.hint_char1()
command! HopChar1Visual lua require'hop'.hint_char1({ extend_visual = true })

" The jump-to-char-2 command.
command! HopChar2 lua require'hop'.hint_char2()
command! HopChar2Visual lua require'hop'.hint_char2({ extend_visual = true })

" The jump-to-line command.
command! HopLine lua require'hop'.hint_lines()
command! HopLineVisual lua require'hop'.hint_lines({ extend_visual = true })

" Highlight used for the mono-sequence keys (i.e. sequence of 1).
highlight default HopNextKey guifg=#ff007c gui=bold
Expand Down

0 comments on commit 5823339

Please sign in to comment.