Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
11 votes

How can I clear a register/multiple registers completely?

For those wanting to remove the register name (say, a) from the :registers list, there is a way to do it now. Run the command :call setreg('a', []). I found this out from this question on ...
Jason Cemra's user avatar
7 votes

How can I clear a register/multiple registers completely?

Put this in your .vimrc: command! WipeReg for i in range(34,122) | silent! call setreg(nr2char(i), []) | endfor and clear every register with :WipeReg If you would like that to happen every time ...
laktak's user avatar
  • 2,943
5 votes
Accepted

Possible to rename file and maintain undo?

Using :saveas keeps the undo history intact. :saveas is equivalent to the combination of :w newname followed by :e #. I usually find it more handy than the :w + :e, especially since with :saveas it's ...
filbranden's user avatar
  • 28.9k
4 votes

How can I clear a register/multiple registers completely?

For those using Neovim, you might discover that your changes do not persist upon restart. You'll need to execute the following command after clearing a particular register (e.g. after clearing a with ...
Mateen Ulhaq's user avatar
3 votes

How to save window, split, and buffer layout?

You can try the vim-workspace plugin, its session management features are automated, scoped for your current working directory, and is pretty simple (only need to run ToggleWorkspace once).
jaybay's user avatar
  • 91
3 votes
Accepted

Local persistent undo file modeline

No, the 'undodir' option cannot be set from a modeline, because it has the 'SECURE' flag set. Since this is a global option, it does not make sense to set this option differently for a specific file, ...
Christian Brabandt's user avatar
2 votes

Can I be notified when I'm undoing changes from the undofile?

I think I'd also accept an answer that gave a command that reverted the file to the state it was in since the last time you opened it. (Or better, jumped back to that undo state.) > Rich I really ...
dsfdsfd's user avatar
  • 21
1 vote

Possible to rename file and maintain undo?

Tim Pope created eunuch plugin with such feature. It has :Move and :Rename commands. Do not know if it works under Windows since description is about UNIX shell commands, can't test it right now. Also ...
Dmitry's user avatar
  • 416
1 vote

Where is my viminfo file on Windows?

For corporative environments usually is set the %HOMEDRIVE and %HOMEPATH% and the GVIM use it (version 8.1 at least) . option.txt help file : *$HOME-windows* On MS-...
ceinmart's user avatar
  • 121

Only top scored, non community-wiki answers of a minimum length are eligible