Size: a a a

2019 December 26

Q(

QoBi BeN NuN (THiaGo NuNeS) in NeoVim
Is there a way to navigate between two positions in a document when one is editing it?
источник

SA

Sergio Araujo in NeoVim
QoBi BeN NuN (THiaGo NuNeS)
Is there a way to navigate between two positions in a document when one is editing it?
On insert mode <c-o> allows you to run a normal command.

I would get out insert mode, jump to the other position and use "gi" to get back insert mode on the last insert point
источник

SA

Sergio Araujo in NeoVim
QoBi BeN NuN (THiaGo NuNeS)
Is there a way to navigate between two positions in a document when one is editing it?
Another option, split current window with "ctrl-w v". On the split window, perform actions and close with "ctrl-w q".
источник

SA

Sergio Araujo in NeoVim
If you need to jump to another place And get back you can mark the current position, let's say 'ma', creating mark 'a',  use single quote + letter to get back to any mark, like "'a"
источник

SA

Sergio Araujo in NeoVim
Another option Ctrl+o in normal mode to get back to the last position on the jump list, ctrl-i goes to the newer position on the jump list
источник

SA

Sergio Araujo in NeoVim
g; goes to older position on "changelist" and g, goes to newer position
источник

Q(

QoBi BeN NuN (THiaGo NuNeS) in NeoVim
Thanks a lot, mate.
источник

SA

Sergio Araujo in NeoVim
QoBi BeN NuN (THiaGo NuNeS)
Thanks a lot, mate.
You are welcome!
источник

SA

Sergio Araujo in NeoVim
comparing two files

Open them side by side
vim -O foo.txt bar.txt

:set scrollbind
In both. Now they move together
источник

Q(

QoBi BeN NuN (THiaGo NuNeS) in NeoVim
Sergio Araujo
comparing two files

Open them side by side
vim -O foo.txt bar.txt

:set scrollbind
In both. Now they move together
That's pretty useful.
источник
2019 December 27

SA

Sergio Araujo in NeoVim
It's also pretty cool setting:

cursorline
cursorbind

I am trying to set all this at the command line at once
источник

SA

Sergio Araujo in NeoVim
after opening the two files run:

:silent windo set scrollback cursorbind cursorline
источник

SA

Sergio Araujo in NeoVim
windo command runs each command in all opened windows
источник

SA

Sergio Araujo in NeoVim
try tyis:

vim -O test.txt test2.txt +'silent windo set scrollbind cursorbind cursorline'
источник

SA

Sergio Araujo in NeoVim
are there abbretiated versions
   vim -O test.txt test2.txt +'silent windo set scb crb cul'
источник

SA

Sergio Araujo in NeoVim
источник

SA

Sergio Araujo in NeoVim
Press in normal mode:

1 Ctrl-g

vim shows you the full path of the file

2 Ctrl-g

Vim shows you also the buffer number
источник

SA

Sergio Araujo in NeoVim
Vim select mode, jumping to the other edge.

Let's say you have to extend or diminish one selected area. You just need press 'o' and use j or k or even l or h
источник

SA

Sergio Araujo in NeoVim
Insert your IP address at the first line

:0read !curl --silent ifconfig.me
источник

SA

Sergio Araujo in NeoVim
источник