Questions tagged [leader]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
64 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
54 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,194
1 vote
1 answer
85 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
240 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
73 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
  • 349
1 vote
0 answers
45 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
860 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
  • 243
3 votes
1 answer
391 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
  • 613
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,435
2 votes
2 answers
420 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
199 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
  • 219
1 vote
1 answer
120 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
692 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
  • 481
1 vote
1 answer
94 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
  • 350
-1 votes
1 answer
540 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
535 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,245
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
  • 203
1 vote
0 answers
701 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
210 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
  • 494
1 vote
1 answer
209 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
193 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
8k 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
803 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
  • 901
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
  • 527