For some reason, when I use single line search movements (f,F,t,T) in VI macros, and I try to execute them, they're noticeably slow (~5 seconds)
Other macros not using those movements are fine and normal.
Is there an easy way to find what is causing this?
I suspect that you have other key maps starting with 'f', 'F', 't' and 'T', and Vi is waiting for a time-out before executing them. What does ":verbose map f", ":verbose map F", etc. show?
Related
I'm new to (Neo) Vim and I'm trying to find configurations that I like and learn from them.
Whenever I watch people code in vim/neovim, I notice that their cursor a thick box, same as when they're outside of Insert mode.
Basically, while in insert mode, my cursor is thin like this |, but I want to change it so that it's thick like it is when you're outside of insert mode.
I'm on the latest version of Neovim and I use Windows 10 if that's useful information.
Yes, that is possible with guicursor option, but whether what option takes effect also depends on your terminal, for example, using Windows Termianl.
This is a working setting to make cursor shape block in insert mode:
set guicursor=n-v-c-i:block
which means to make cursor shape block in normal, visual, command, and insert mode. For more details, please use :h 'guicursor'.
You should be able to change that setting with guicursor. (For NeoVim there is termcap-cursor-shape.)
But note that the two different cursor actually make sense: In normal mode you are always on a character (i.e. you can use i and a to produce different results), while in insert mode the curor must be between two characters.
Personally I think that it would just get confusing to have a blocky cursor in insert mode due to the reason above, but furthermore it would make it harder to distinguish the two modes too!
And for future reference, there is a dedicated stackexchange for vi and vim!
I'm learning Vim for few days and I have a question when coding with vim.
Let say I'm creating an object like this
const person = {
name: "Tu<my pointer after u character>"
}
What is the best way to move my pointer from after u character to after the double quote so I can keep writing my object
Another case is if I finish create object like this
const person = {
name: "Tu<my pointer after u character>"
}
How do I get my pointer to the line after the close curly bracket to keep writing code.
Some people say that I can escape the insert mode and using shift + A to go end of line but it takes 4 buttons to do that?
Thanks for answering my question.
Indeed the way to do it is to escape insert mode and use A to
[A]ppend stuff to the end of the line. To jump to the } in your code, there
are many many options, and which to use depends on the situation and user
preference, but I tend to use something like 3j to move 3 lines down (or
however many I need to move). And by putting the following in my vimrc:
set number
set relativenumber
I always know what number of lines I want to move.
Vim seems a bit weird for about 2 weeks (for me at least, when I started coding
in Vim) but after that it becomes automatic that if I finish inserting text for
any reason, I instinctively hit Esc. Many (most?) vim users remap
the some other key like CapsLock to act like Esc, since the Esc key on
modern keyboards is in an awkward position (unlike in the early days).
Once the 'modal' nature of vim becomes natural for you, things will fall into
place.
Oh, and it really helps if you learn to touch type 100% (i.e. never need to
look at the keyboard - even for numbers, punctuation, 'weird symbols' etc.)
Good luck!
In the first case, press <Right> or <End>, just like in any editor.
In the second case, press <Down> to move the caret after the }, then press <CR> (to open a new line) or <Down> (to move the caret to the line after the }), just like in any editor.
Going back to normal mode just for that is silly.
Note that you wouldn't have to deal with this without whatever you installed that closes quotes automatically.
I'm playing around a bit with DrRacket in the BSL language.
When I'm trying to create a comment like so:
;; Hi(10, 50]
The program fails in the moment when typing the ]. I can only end it via TaskManager. It uses 13 CPU in the TM.
Has anyone of you a solution for that? or is it simply not to use ].
Thank you
This is some bug that was reported several times recently, and there's no fix, yet. It's probably a result of some non-english keyboard layout (which was the case in these reports). Hopefully it will get fixed soon...
UPDATE: The bug was fixed for the next release, but in the meanwhile Matthew posted some instructions on how to do a temporary fix -- repeated here for reference:
We have tracked down a problem that occurs when the AltGr key is needed
to type ].
DrRacket gets stuck due to a bad implementation of an operation that is
intended to be bound to Alt-]. For most of you, though, the problem is
that you didn't want the Alt-] keybinding at all; you're just trying to
type ], and it's misinterpreted as Alt-].
You can work around the problem by placing the five lines at the end of
this message in a file, and then selecting the file via the
Edit -> Keybindings -> Add User-defined Keybindings...
menu item in DrRacket. Typing ] should work immediately after, and
typing [ will also give you just [ (instead of [ and ]).
Beware that after you select the file, it will be difficult to unselect
it. It turns out the the menu item to un-select a keybindings file is
also buggy! Your best bet is to put the file in a place that it can
stay. (You can still edit the file and restart DrRacket if you just
want to drop the bindings.)
i have problems with my laptop keyboard output (tried with usb keyboard everything works perfectly, bought new one-still same problem,reinstalled drivers,windows,registry entries looks correct,even in bios keyboard have same problem,keyboard connector cleard and looks fine) .. so every time i press key 'v' it comes out as 'v6' and when i press '6' comes out as 'v6', when i press 'b' it comes out as 'b8' and when press '8' it comes out as 'b8' and so on with several others keys..
if someone knows what is the problem with my laptop or know solution pls let me know,
i would like to write script in autohotkey but i dont know how to write correct command line for my problem..so this is what i want to acommplish: clearly when i press v i want v not v6 :p .. so i want command line that will erase with backspace this faulty 6..
when i enter command line 'v::backspace' it comes out '6' and i want 'v'. When i write '6::backspace' it doesnt comes out nothing so im confused and need correct command line or some kind of solution (except changing motherboard,and im sure it would solve the problem).
tnx!!
Simple, just replace the v6 or b8 like this:
:?*:v6::v
:?*:b8::b
I'm sure the answer to this question is obvious, but I've read the Counterclockwise documentation and searched on the internet and haven't been able to find it. I frequently end up accidentally putting extra brackets, parens, etc while editing Clojure files in Counterclockwise and have not been able to figure out how to delete them without dropping out of strict paredit mode. For example suppose I have the following function:
(defn (add-x-y-z)
[x y z]
(+ x y z))
I've accidentally put parens around the function name, and as far as I can tell there is no way to delete them short of deleting the function name, deleting the extra parens, and typing the function name back in again, or temporarily dropping out of strict paredit mode. Is there any other option for this? For whatever reason, I run into this problem quite frequently.
You need 'Raise Selection' I believe, which on Mac is Option-R
FYI, you can look at all the key bindings in the preferences window, but as ever can be difficult to find in eclipse. See attached screenshot and notice that I've sorted on 'When' = 'Editing Clojure Source'