write command doesn't work when mapped
See original GitHub issueIn my init.vim
I have
nnoremap <Space> <Nop>
let mapleader="\<Space>"
nnoremap <leader>w :w<CR>
and in VSCode, everything else works great, but when I press space
, nothing happens. Same with space
w
.
Do I need to do something special for the leader? Is there a way to debug and see what is going wrong?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Mapping a command not the same as writing ...
I'm trying to use a mapping in my vimrc to execute a command. The command works if I directly type it into the...
Read more >Network drive mappings not working properly
go back to command prompt. type in "net use z: "\\george-backup\backup /p:yes; able to access networked mapped drive now from both Explorer ...
Read more >Conversion of Ex command to mapping not always working
:help sees | as its argument, so I suggest to write a simple function. function! s:search_help(str) exec 'help '.a:str only endfunction ...
Read more >Having trouble executing <enter> automatically in a stored ...
Put in a literal carriage return character instead - press Ctrl + V, then Enter when writing the map: :map ,k :!python %^M....
Read more >How to Connect to Network Drives on the Command Line ...
Mapping Network Drives Using Logged-In Credentials · 1. Open a command prompt or PowerShell console as administrator. · 2. Let's map the drive ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t think there is a way to override neovim’s save file command, this plugin just has a mechanism to automatically correct :w to :Write. When you use <Cmd> you bypass that correction, thus calling neovim’s save command - not the VSCode save command that normally :w gets corrected to.
This command is only replaced inside the VSCode cmdline if I understand correctly. In mappings you should use alternate commands like
:Write
.