LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-05-2013, 06:18 PM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Vim: z as leader


I've been considering using the 'z' as my leader key, mostly due to its privileged position in the keyboard layout. I know it is already used as some kind of leader (like g, for example) and I inspected all shortcuts assigned to it, and it seems that at least 90% of it has to do with folding, which I never use, so yeah, I definitely want z to be my leader key!

let mapleader="z"

So suppose I want 'zz' to be my 'Undo' shortcut:

nnoremap <Leader>z u

I close and relaunch Vim, to make sure the new binding is enforced.

Well, it doesn't work. Whenever I try it, I get this error:

E490: No fold found

But I just reassigned it!

And ':help z' tells me this:

|zz| zz redraw, cursor line at center of window

I just reassigned it to 'Undo' and its default binding is 'redraw window.' Neither has anything to do with folding. Why is Vim still complaining about folding when I press 'zz'?

:-(
 
Old 07-09-2013, 11:27 PM   #2
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
«map zz u» works as undo
 
Old 07-10-2013, 01:24 AM   #3
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by Ygrex View Post
«map zz u» works as undo
Doesn't work for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to make Vim (scripts) write to stdout? (or, how to use Vim as a filter program?) dedec0 Linux - Software 13 02-04-2013 05:45 AM
[SOLVED] Installing vim-gnome or vim-gtk dependency issues with apt, aptitude, synaptic alagenchev Linux - Software 3 05-15-2012 10:33 AM
LXer: Personalize and Optimize Vim editor using Packt’s new Vim 7.2 book LXer Syndicated Linux News 0 05-20-2010 10:20 PM
Switching from vim to vim -g from inside vim iDragoon Linux - Software 4 05-15-2009 11:46 AM
Editor comparison: vim VS vim-lite, Cleaning vim Ruler2112 *BSD 4 04-13-2009 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration