Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ct<leader> or cf<leader> doesn't work. Need ct<leader><leader> #81

Closed
gerardroche opened this issue Apr 6, 2017 · 2 comments
Closed
Milestone

Comments

@gerardroche
Copy link
Contributor

Issue by johnathanz
Tuesday Sep 30, 2014 at 14:43 GMT
Originally opened as guillermooo/Vintageous#741


Great work on Vintageous btw, it was the straw that converted me to ST3 👍

I'm trying to carry over the concept of to Vintageous purely through key mappings. I use "," as and have a number of keys mapped as

[",", "t"] or [",", "i"]

unfortunately this causes Vintageous to wait for another character if "," is the last key in a command.

Say deleting a line up to & including ","

When I press "cf," the comma isn't registered, I have to press comma again for it to work. I suspect Vim has a keypress delay that's used to gauge whether it's a , or a command that ends on the key.

Is there anyway this could be fixed in Vintageous?

@gerardroche
Copy link
Contributor Author

@johnathanz 1.3.0 adds the ability to create .vintageousrc mappings using a a leader keay anywhere in the mapping. https://github.com/NeoVintageous/NeoVintageous/blob/master/CHANGELOG.md#130---2017-07-21

let mapleader=,

" Visually select all content
nnoremap cf<leader> ggvG

Currently you can only map to commands that Neovintageous understands and can't yet map to ex mode commands nnoremap cf<leader> :w. This will be implemented hopefully by v1.5.

@gerardroche gerardroche added this to the 1.4.0 milestone Oct 9, 2017
@gerardroche
Copy link
Contributor Author

@johnathanz This has been fixed in the latest 1.4.0 release (NeoVintageous is a fork of the discontinued Vintageous plugin):

The issue with Sublime Text mappings is they circumvent NeoVintageous. NeoVintageos remaps keys, but when you create a mapping like [",", "t"] and then press ,, ST sees that key is ambiguous so it has to wait for the key press.

The way to fix this is to create mappings in your vintageousrc file so that the key presses are registered with Neovintageous.

Mapping to Command-line mode commands is supported for basic use-cases: >
:command

Mapping to Sublime Text commands is supported for basic use-cases. The command
must start an Uppercase letter to avoid confusion with built-in Command-line
mode commands. The command is converted to snake_case. For example to map to
the Sublime Text command "toggle_side_bar": >
:ToggleSideBar

Here is an example |vintageousrc| file: >

" The character " (the double quote mark) starts a comment

let mapleader=,

" Enter command line mode.
nnoremap <space> :

" Toggle the side bar.
nnoremap <leader>d :ToggleSideBar<CR>

See the :help neovintageous command for information.

Also see the forum post on latest release: NeoVintageous 1.4.0 released zap KAPOW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant