Skip to main content

Questions tagged [leader]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
61 views

set noshowcmd to only hide partial commands

In normal mode when I press Space (which is my leader), Vim/NeoVim always displays <20> in the command area. I find this visually distracting. I know that I can disable it with set noshowcmd, ...
aep's user avatar
  • 111
1 vote
1 answer
80 views

Run "+normal <leader>?" when starting vim on the command line

Context vimrc: maps <leader> to , maps ',?' to an action From a terminal, vim '+normal ,?' runs the action just fine. Problem Run the same terminal command without hardcoding the character ...
David Andreoletti's user avatar
0 votes
0 answers
142 views

How to use <Leader> in a normal command today?

The answer to the question with the same title doesn't seem to work for me. Not sure if the behavior has just changed overtime. To reproduce the issue, open Vim via vim -Nu filebelow.vim, where the ...
Enlico's user avatar
  • 2,276
1 vote
1 answer
128 views

Remove all leader mappings before creating my own

The question pretty much sums it up: Is there a way to clear all of the <leader> mappings set by plugin authors before proceeding to set my own custom mappings? The only way I've seen to do this ...
apostl3pol's user avatar
0 votes
1 answer
273 views

leader keys are just being disabled when changing it

I am using Vim with SpaceVim, and I am trying to change the leader keys as explained by the SpaceVim wiki page. But what is happening is that the leader keys are just being disabled. I am using VIM - ...
Delfin's user avatar
  • 103
2 votes
1 answer
95 views

Use leader key mapping in another mapping - not working

I'm trying to use a leader mapping in another mapping. But nothing happens when I attempt to use the second mapping. I'm quite sure I've done this before. What's going wrong? This mapping finds the ...
markling's user avatar
  • 409
1 vote
0 answers
51 views

How do I make <leader>keys do nothing if they aren't mapped?

Right now by default, when I do <leader>keys, if keys is not mapped to anything it will run those keys as if I did not map them (i.e, doing <leader>o would just do o if I don't map it to ...
joshpetit's user avatar
  • 133
3 votes
1 answer
1k views

use comma as leader but keep comma's original functionality as <leader>, (i.e., two commas)

I use a comma as my leader key. I would like to be able to press the comma twice rapidly (i.e., <leader>,) to achieve the native functionality of the comma (i.e., jump back after f/F and ;). To ...
Alex Roberts's user avatar
0 votes
1 answer
1k views

Mapping Leader to a Ctrl combination not working/being ignored in NeoVim mappings?

I'm trying to map my leader to <C-s> and local leader to <C-q>, in my NeoVim (0.5.0) init.lua file. I know Ctrl-S and Ctrl-Q are software flow control, and I mainly use the terminal ...
Chris's user avatar
  • 253
3 votes
1 answer
434 views

Recursive map to <leader> not working

I have a german keyboard and \ is hard to reach, so I added the following line to my config: map ß \ This works fine for simple leader commands, and I did not have to change my leader command in case ...
Kaio's user avatar
  • 633
1 vote
4 answers
1k views

Can I remove all maps containing key?

I have a plugin (c.vim) which includes a lot of maps (all with leader key). I changed my leader key to space, which I like, but the problem is that the maps also apply to insert mode. I would like to ...
Not me's user avatar
  • 69
0 votes
1 answer
2k views

Setting localleader

I've tried setting localleader using: :let localleader="]" And it seems to be 'working': :let localleader localleader ] However, when I try and run a command using localleader, it doesn'...
David542's user avatar
  • 2,485
2 votes
2 answers
468 views

How to set <C+k> as vim leader key?

I've tried let mapleader="<C+k>" or let mapleader="\<C+k>" But it seems that both of them can't work.
Edward Lin's user avatar
1 vote
0 answers
230 views

Repeat <Leader> mapping without having to press/release full combination

Similar to this question, I want to be able to resize my splits in a repeatable manner, but without having to use a plugin. I currently use the mapping: nnoremap <Leader>q <C-w>10< ...
ThoseKind's user avatar
  • 239
1 vote
1 answer
124 views

how to map # to , (when , is my leader) while using vim-sneak

I use ',' as leader, so when I f/t and I want to go to previous hit, I cannto use ',' I tried using #: nnoremap # , My mapping shows up (I think), :map # shows this n # * , but it does ...
Persimmonium's user avatar
1 vote
1 answer
721 views

localleader is not obeyed

for my fortran code, I have defined: au FileType fortran let maplocalleader = "`" # i have tried \` as well. For fortran filetype in vim, :echo maplocalleader is showing ` as expected. But, then,...
BaRud's user avatar
  • 491
1 vote
1 answer
110 views

mapping <leader>; and <leader>, to ; and , respectively

My <leader> key is , and for convenience I'm using for a few years now the ; normal-mapped as a :, to save me a key stroke to type :commands. Now, I know that , and ; are shortcuts themselves, ...
DrBeco's user avatar
  • 380
-1 votes
1 answer
594 views

E73: tag stack empty while creating a map<leader>

When I append map <leader>tn :tabnew<CR> to my .vimrc and while tried to run this with :,tn command it says E73: tag stack empty.
mantaray's user avatar
3 votes
2 answers
567 views

Detect existing key binding before creating one

A plugin I've recently started maintaining currently checks to see if any bindings exist to its functions before creating the default ones. This makes it easy to setup custom bindings and not have to ...
Caleb's user avatar
  • 2,265
2 votes
1 answer
2k views

Can mapleader be Ctrl or Shift?

Must mapleader be a key with a char? Can I use Ctrl/Shift/Alt or some other keys which won't type a char in insert mode?
chrisyue's user avatar
  • 233
1 vote
0 answers
758 views

<localleader> not working in .tex files, but working for the other filetypes

I use vimtex, latexmk and neovim in order to edit .tex files in Vim, but for some reason my local leader does not work in .tex files, though the leader works and the local leader works for other ...
Ul Tome's user avatar
  • 31
0 votes
2 answers
215 views

Go to line with `<line><leader>` without timeout

I currently have nnoremap <leader> G in my .vimrc so I can go to line 123 by typing 123<leader>. However, since I have other leader combinations, such as <leader>u, the line ...
Bananach's user avatar
  • 524
1 vote
1 answer
215 views

Get <Leader> value as <Space> and not ' '

Given that I defined let mapleader="\<Space>", I would like to get in the vimscript the value of the leader as <Space> and not as ' '. The latter may be obtained by using get(g:,"mapleader"...
igorepst's user avatar
  • 143
0 votes
1 answer
207 views

map something to the action of the leader key?

I have this in my vimrc: let g:mapleader = "," nnoremap # , so I use , as my leader, and want to use # for backwards search after f,t...But my # mapping does not work, so something is amiss thanks
Persimmonium's user avatar
5 votes
2 answers
9k views

How do I define LocalLeader as <Space>?

I need to define LocalLeader for various plugins and I would like to set it to <Space>. If I add this to my vimrc file let maplocalleader = "<Space>" typing space in normal mode just ...
Paul Irofti's user avatar
2 votes
1 answer
832 views

What is the difference between let mapleader =”,”, and let g:mapleader=”,”

In one of the most popular vimrc’s available (Aimx’s vimrc), there is a line which maps both leader and g:leader to “,”. https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim#L58 What is the ...
alpha_989's user avatar
  • 911
7 votes
2 answers
4k views

What does [count]<leader> mean?

I found a command in NERDCommenter like this: [count]<leader>cc |NERDComComment| I have installed the plugin. But, I don't know how to make it work. So what's the meaning of that command? How ...
Mas Bagol's user avatar
  • 537