How to scroll up/down through commands in vim without arrow keys - vim

I've disabled the arrow keys to practice using the various navigation commands. However, I'm not sure how to scroll up/down through multiple options or history items. A basic example would be:
:colors 256-grayvim
Usually, I can then press the up/down arrows to scroll through all the color options. Or, I commonly type : and then up/down to view my command history. Is there a better way to do this then without the arrow keys?

You are looking for <c-n> and <c-p>. Those can navigate through your command history. To be honest i don't think that using the arrow keys is a bad option there. You should primarily avoid them in normal mode.
See :h up-down-motions

Related

Use AHK to detect the "Vim Mode" for GUI windows and configure conditional mappings of keys

The motivating story (TL;DR)
Terminals, due to historical reasons, won't distinguish tab from Ctrl+I. This makes quite a mess when I use Vim: my muscle memory tells me that Ctrl+I shall advance me forward to the next position in the "Jumplist", but some Vim-plugins do remap the tab key to do other good stuffs.
Better defined task
Can I make a "conditional mapping" for active windows from ahk_process gvim.exe when no "special characters" are shown at the bottom left corner of the active Window?
For the window on the left, the Vim session is in "Normal-mode"
For the window on the right, the Vim session is in "Insert-mode".
Other modes do exist, like Visual-mode
At the end of the days, I would like to map the tab key only in "Normal-mode". The best that I can come up with is to OCR a fixed region of pixels at the buttom-left corner, and make it a conditional. Yet, I am inexperienced for getting OCR jobs done in AHK.
Sidenote: I am asking for help from the Vim community the flipside of the same question: https://vi.stackexchange.com/questions/18796/may-i-have-a-vim-session-report-its-mode-in-its-window-title
No need for OCR/AHK hacks.
:nmap (and :nnoremap) maps only in normal mode.
:imap (and :inoremap) maps only in insert mode.
etc.
See :help :map-commands for the variety of different mapping commands for variety of modes.
If a plugin is overwriting a normal-mode mapping for Tab, see who the offender is by using :verbose nmap <Tab> (or its equivalent, :verbose nmap <C-I>), then look at its documentation to see how to rebind it (or in the worst case, eliminate the culprit).
There's no need to grab Vim's current mode to make it available to another application; that would be really cumbersome. If your eventual goal is to send different keys for <Tab> / <C-i> to Vim (e.g. <F13> instead of <Tab>), and you only want Vim to react differently in certain modes (e.g. normal mode), you can just map the other modes to again unify both keys:
:nnoremap <F13> ... " Functionality A
:nnoremap <C-i> ... " Functionality B
:map! <F13> <C-i> " Both keys continue to do the same in insert and command-line mode.

Use Emac keys while in insert mode?

Using all of Vim, Xvim(for Xcode) and Ideavim(for IntelliJ), I'd like to be able to use the default keybindings while in insert mode rather than Vims. I've been using Xcode for quite some time now and have gotten quite good at typing with the standard Xcode bindings but Vim bindings are so much better while not in insert mode.
I know you can do .vimrc settings such as
:im <C-D> <esc>xa
to emulate these functions, but this still leaves problems with slightly different behaviors as well as losing functionality where these commands have multiple uses. IE ctrl+n is both down while typing and next while scrolling through autocompletions. Custom bindings in .vimrc removes the ability to scroll through autocompletions.
Using
:im <C-N> <NOP>
enables scrolling through autocompletions but still doesn't let it function as down.
Anybody know how to solve this?
If you really want to, you can put
nnoremap i :action VimPluginToggle<CR>
into your ~/.ideavimrc, then in Preferences => Keymap, find the Vim Emulator item and assign the shortcut ESC to it. This when instead of entering insert mode, you'll be disabling IdeaVim, and hitting ESC will re-enable it.
I tested this briefly and it does seem to work at least at a superficial level, although you lose the changing caret style as an indicator of which mode you're in. I'm not sure that's a good idea, however. Probably better to work within the system as designed and set up the bindings you want.

How to select without arrow keys in INTELLIJ

I hate to use arrow keys in IntelliJ. However, when IntelliJ gives me some advices (auto complete, etc.), as in the picture, it seems that I have to choose them with mouse or arrow keys.
Is there a way that I can switch the selections without using arrow keys?
For example, maybe I can use <C-n> (or other keys, like) to switch between these suggestions.
You can go to Settings | Keymap, find actions "Up" and "Down" there and assign whatever shortcuts you like to them.

How to use arrow keys in vi in screen

I just started to use screen and I found it being very convenient to use. However, there's only one thing that bothers me is that screen unbind my arrow keys in vim.
Now, I understand that I should use hjklwf and such in vim, but as a typer that often make typing mistakes, i NEED the arrow keys in insertion mode.
So my question is, how do I configure vi or screen so that my arrow key will work?
cat > /dev/null
^[[A^[[B^[[D^[[C # UP DOWN LEFT RIGHT

Is it possible to use vim with the mouse

Is it possible to use vim with the mouse?
If so, how?
You can enable the mouse with :set mouse=a (The letter 'a' means enable it in all modes)
With GVim, you can select text and move the cursor, and select menu options with the mouse. Copy and paste, by right-clicking etc... But I guess this misses the point of using VIM.
You can map certain actions to mouse left click and right click. And there are plenty of already mapped actions to work with ctags and other things.
:help mouse-using

Resources