List vim buffers in sublimetext? - sublimetext3

Is it possible to list vim buffers in sublimeText? Like a history of yanked text?
from https://www.sublimetext.com/docs/vintage.html
What’s Not
Insert mode is regular Sublime Text editing, with the usual Sublime Text key bindings: vi insert mode key bindings are not emulated.
Ex commands are not implemented, apart from :w and :e, which work via the command palette.
Is it categorized under ex commands?

Related

where can I find vim editor key list?

I am currently using vim editor and want to customize my keys
I have learned how to map certain keys to keys by searching documentations,
but failed to find how the special keys are defined in vim.
for example, I have to use map <Esc> <CR> instead of map esc enter
I want to change ctrl key to caps lock key, but cannot find how that special keys are represented in vim editor.
Also want to change :w to something.
failed to find recommended documentations, some advice would be appreciated!
You can find all special Key notations by entering :h key-notation. :h key-codes or :h keycodes.
But Vim will not receive the press of a key Like Capslock or Ctrl (Modifiers). The OS does not pass it to vim. Vim will only know about Ctrl the moment a second key is pressed, and receive the result of them both: Ctrl+p for example is one keypress for vim.
It is the same with Capslock. Vim will just receive the modified Character. So if Capslock is on and you press a vim will not receive Capslock+a but only A because that is the result of both.

How to bind key-mapping for saving selected text to file in vim?

In vim, I select a text in visual mode, and type :w! ~/saved.txt, actually vim will execute :'<,'>w! ~/saved.txt. like this:
The command will save the text into ~/saved.txt. In another vim instance, I can use :r ~/saved.txt to read from ~/saved.txt to the other vim.
This implement a global copy-paste on the same machine. I want to make this a vim-command/key-mapping, while I don't know how to implement it.
A simple key-mapping:
vnoremap ,w :w! ~/saved.txt<cr>
nnoremap ,r :r ~/saved.txt<cr>
Replace ,w, ,r with your favour.

How to bind a key to autocompletion in nvim's terminal mode?

I would like to bind CTRL-N in nvim's terminal mode to autocomplete, just like CTRL-N in insert mode. I don't know command what CTRL-N is bound to in insert mode, so I am not sure how to bind it to the same key in another mode. I am new to Vim and might be confused by emacs concepts here.
The vim completion only works in insertmode, its not possible to open the completion menu in other modes.
the terminal mode however does allow you to remap keys so to make <C-n> activate the shells completion system one would add to init.vim
tnoremap <C-n> <Tab>
this might however not be what you asked for.
your asumption is right your in terminal mode. The autocompletion feature of vim doesnt work in the terminal as its a special kind of buffer that can not be edited. There are plugins though that create a pseudo terminal where the completion menu can be used see
https://github.com/Shougo/vimshell.vim

Screen command disable the control key ctrl-a to use it in vim?

I sometimes open vim with screen linux command but since ctrl-a is considered as control key I cannot increment numbers using the same combination inside the editor.
I don't want to remap entirly ctrl-a but is there a way to disable it so I can use it in vim ?
In screen, you can pass on the prefix key via Ctrl-A followed by a (cp. here). In tmux, this would be Ctrl-b Ctrl-b. Either can be adapted in the tool's configuration file.
Alternatively, you could remap the increment inside Vim, e.g. by putting the following into your ~/.vimrc:
noremap <C-q> <C-a>
You can remap screen to use a different escape if you want. I use Ctrlt.
In .screenrc:
escape ^Tt
This will map the screen metacharacter to Ctrlt. And it also maps the literal sequence of Ctrlt + t to send a Ctrl-t through to the application running inside screen.
This would free Ctrla so screen will not be using it, and it will be passed through to Vim.

<C-6> like mapping for browse through *all* open buffers in vim

I am using project and minibufexpl(mbx) with my vim.
The problem is using <C-6>, the buffer only toggles between last two open buffer, and not the all buffers open.
I checked vim's wiki but it says about listing the buffer and then selecting them manually i.e. map for :ls and :b. Not much helpful.
Though, I can move through all the open buffers using mbx's way, (go to mbx window and keep pressing arrow), a like alternative would have been helpful if it can span through all open buffers.
Any help please?
The simplest solution to your problem seems to be to use Vim's built-in :bn and :bN.
See :help buffers.
I've tested this in vim 7.3 on a Linux installation.
To have Vim insert a character sequence instead of doing the action, prefix it with Ctrl+v or Ctrl+q (in Windows). So to get the map sequence for Ctrl+right arrow press Crtl+v, then Ctrl+right arrow to get Vim to insert ^[[1;5C, similarly ^[[1;5D for Ctrl+left arrow.
You can then add the following to your .vimrc file to cycle through all buffers by pressing Ctrl+right arrow or Ctrl+left arrow:
nmap ^[[1;5C :bn^M
nmap ^[[1;5D :bN^M
nmap does the mapping only for normal mode. The ^M means Ctrl+v, then <return>.

Resources