I want to set permanent macros in VScode vim, but as soon as my mac restarts, the previous macro will be clear. Though I can set permanent macros in terminal vim and it is valid after my mac restarts, I also want to know if VScode vim can support this function because I take VScode as my main vim editor.
saving macros #2380
At this point I don't think this feature is available; but there are workarounds mentioned in the issue. Also:
#fredyonge In the next version you'll be able to save registers across sessions, but there are still some major issues that need to be figured out before it'll work for macros as well.
Related
I have an instance of vi on a remote server that is not behaving like it used to, and I'm not sure what made this happen.
On my local shell, (and the remote server before this started happening), if I scroll with my mouse/touchpad, it would navigate the cursor within vim. I have checked my .vimrc and there's nothing in it relating to the mouse, and I did not make any changes to it before this issue started.
The only thing I can think of is that a few weeks ago, I was trying to figure out how I could split two files in the same vi instance so I could yank from one file to another, and I tried some : commands that I didn't really understand (didn't get any productive results). And also, I ran tmux once, but I don't think there are any . files that are applying unwanted settings (not sure).
I can't find anything to check the vi settings being applied, but I know that my .vimrc is working, and it's not anything in there (if I comment everything out it still behaves this way).
I just want my vi to respond the same way.
Describing the problem more exactly:
If I scroll, the cursor doesn't move, instead it scrolls on the terminal window, and it shows the previous bash commands instead of scrolling the file being edited. If I navigate using vim keys, it still works.
Randomly, I discovered that it actually had to do with the a specific terminal instance that was causing the issue. Closed it, opened a new one, no issue now. If anyone has any insight on why this could've been, I'd love to know.
.vimrc applies to vim not vi, doesn't it ?
the problem of scrolling might come from your terminal emulator as well.
I usually use embedded terminal in VS code which is not ideal (since it's not made for administration ...) but it's practical with keybinds to jump from one window to another, copy paste ...
I know some colleagues who use, mobaXterm or mremoteNG on windows.
I know I should give a go to Terminator, but it's on linux only and I don't want to run a local vm just for that.
While working on (presumably) any file in this project in Vim, when I type :FufCoverageFile, Vim freezes and I have to completely exit the terminal window.
I thought it might be a cross-project issue with my .vimrc, but I've only ever seen it happen on this project. (Granted it probably still is a global issue with my config, just more subtle.)
I thought it might be an issue with vim sessions, but it happens whether or not I'm using a session. Plus, I deleted the project-specific session from ~/.vim/session and the issue persisted.
I considered (but didn't really believe) that it might be an issue with tmux, but it happens whether or not I'm inside a tmux session.
Just what in the heck. :)
Here is my .vimrc at tme of posting, for reference. Thanks for any help you can provide!
Browsing the documentation for vim 8 I wasn't able to find a way to turn off the (new ?) behaviour that it would re-open all (or some?) files that were open during last session.
Note that I haven't saved anything using e.g. mksession, vim's behaviour just seems to have changed starting with v8. Does anybody know how to get rid of this feature?
#romainl's comment helped me find that this really is due to some lines that I've had in my configuration for quite some time, however the previous versions of vim which I've used appear to have been compiled without +viminfo support, which is why I haven't experienced this behaviour before.
As a reminder: viminfo can be used in order to save and restore things like open buffers, search expression, etc. between vim sessions. This works apart from manual session management via e.g. mksession.
I tend to maximize a terminal to one screen, and vertically split several windows in Vim. Everything works fine for the first few windows on the left, but clicking past about the 220th column in the terminal doesn't work correctly. Any mouse clicks past column 220 seem to be wrapping around to column 1. I've tested in xterm, urxvt, and Gnome terminal with and without tmux/screen; always the same behavior. If I greatly increase the size of the font in Gnome terminal, I can click on the last column (although it is no longer past column #220).
If I run a command in a terminal that prints to standard output, I can click all the way to the right of the terminal. The problem does seem to be related to Vim.
I have set mouse=a in .vimrc. I'll post the entire file on request, but it doesn't seem to have anything else related to the mouse.
It's probably irrelevant, but I'm running Xmonad+Gnome. Thanks in advance.
This has been fixed in Vim 7.3.632. See :h sgr-mouse. Or just put this in your ~/.vimrc:
set ttymouse=sgr
If you want to be compatible with versions that don't have mouse_sgr compiled in, use:
if has("mouse_sgr")
set ttymouse=sgr
else
set ttymouse=xterm2
end
To see if your version of Vim has mouse_sgr, run vim --version from the command-line, or in Vim, enter :version, and look for +mouse_sgr.
If you're using older versions of screen, or terminal emulators that don't support SGR, you may need to upgrade or switch. These settings work with all new versions of screen, tmux, gnome-terminal, PuTTY/KiTTY, iTerm2, and Terminal.app, using TERM=xterm-256color or screen-256color.
Update: If you're using neovim, SGR support is enabled by default.
Edit:
I deleted the bug report, as that tracker was for the website, not the text editor.
In looking in the correct place for an existing bug report, I found this:
http://groups.google.com/group/vim_dev/browse_thread/thread/4c137e64d2032441/b3993eaa89589619?lnk=gst&q=mouse#b3993eaa89589619
To summarize, it was an xterm limitation that has been lifted. However, Vim does not yet support columns longer than 223.
Original:
This seems to be a bug, as supported by comments made by redstreet. I filed a bug report:
https://sourceforge.net/tracker/?func=detail&aid=3389331&group_id=27891&atid=391887
A few years later, the bug still seems to be present.
The solution I found is neovim: a modern refactor of vim. Among other features, this bug has been resolved.
I simply copied my .vimrc into .nvimrc, and my plugins just worked with nvim. Maybe I'll just keep using that.
I stumbled on a way to crash excel in Workbook_Open while making an .xla It's still a toy project, so I've been able to just delete it and start over (and now I'm coming back with version control and baby steps.)
However, assuming I didn't have those options, how would I possibly edit the .xla remove the fatal code, since I have to load it to edit, and loading it crashes the editing environment?
This isn't exactly what you are looking for. But some advice during development.
I always work on my xla files as xls files until they are stable. That way if it isn't stable, I can just not enable macros on opening, and fix the problem, then close and reopen with macros enabled.
--EDIT--
I did some more research, because I was curious and because I remembered hearing about disabling macros on startup. Here is a link that says you can hold 'Ctrl' while Excel is starting, to start in Safe Mode. There is a bit of other information that is worth a read to see if it applies.
http://support.microsoft.com/kb/826922
--EDIT 2--
Another link that says holding 'Shift' might also do the trick
http://www.mrexcel.com/forum/showthread.php?t=348351