OSTechNix · @ostechnix
522 followers · 1487 posts · Server floss.social
Solinvictus :verified: · @dminca
37 followers · 930 posts · Server mastodontech.de

Copy to system clipboard from guide:

1. In your ~/.vimrc set
set clipboard=unnamed

2. Open a file and yank whatever you want, in this example we yank lines 4 and 5 to system clipboard; in command mode, type 4,5y *
set ts=2
set sts=2
set sw=2
filetype off
filetype plugin indent on
syntax on
set expandtab

3. Profit
Paste anywhere you want
filetype off
filetype plugin indent on

#vim #vimtricks #vimtips

Last updated 2 years ago

Solinvictus :verified: · @dminca
37 followers · 930 posts · Server mastodontech.de

Copy to system clipboard from guide:

1. In your ~/.vimrc set
set clipboard=unnamed

2. Open a file and yank whatever you want, in this example we yank lines 4 and 5 to system clipboard; in command mode, type 4,5y
set ts=2
set sts=2
set sw=2
filetype off
filetype plugin indent on
syntax on
set expandtab

3. Profit
Paste anywhere you want
filetype off
filetype plugin indent on

#vim #vimtricks #vimtips

Last updated 2 years ago

Wayne Werner · @ketmorco
239 followers · 706 posts · Server fosstodon.org
H@R0👨🏻‍💻 · @quetalocatl
16 followers · 678 posts · Server mastodon.social

今天發現原來 自帶有一個叫default的colorscheme,似乎是用 terminal 自己的 ansci color。 有時用不同的裝置連ssh 連,例如平板和電腦,terminal和termux的配色都不同,但又不想改vim的顏色。可以修改vimrc 判斷 $SSH_CONNECTION 是否為空,如果不為空即代表是用ssh連進來,就更改顏色為 default

#vim #vimtips

Last updated 2 years ago

H@R0👨🏻‍💻 · @quetalocatl
16 followers · 678 posts · Server mastodon.social

SEO一下

#vim #vimtips

Last updated 3 years ago

OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social
amaz1ng · @amaz1ng
663 followers · 14448 posts · Server social.anon-groups.de

@vimtips
also, if you know, what you search for and you have to change it every time:

open your document.
In NORMAL mode type

/searchstring (ENTER)

start at beginning reach the match.
Type

cw Newstring (ESC)

Now type in NORMAL mode for any next match

n

to change it to the same result type

. (dot)

through the entire document.

This useful if you need to change config-files, eg. "example.com" in your own domain.

#vimtips #vimtipps #boost

Last updated 3 years ago

OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social
OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social

How To Comment Out Multiple Lines At Once In Vim Editor
ostechnix.com/comment-multiple

#Linux #vimtips #VimEditor #vim

Last updated 3 years ago

OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social
OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social

#vimtips #Linux #vim

Last updated 4 years ago

Garrit 🚣 · @garritfra
615 followers · 3385 posts · Server fosstodon.org

A Vim Guide for Advanced Users.

thevaluable.dev/vim-advanced/

#vimtips

Last updated 4 years ago

lopeztel :manjaro: :arch: · @lopeztel
282 followers · 2673 posts · Server fosstodon.org

@robby @vimtips @garritfra we can all be our source for

#vimtips

Last updated 4 years ago

OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social

How To Comment Out Multiple Lines At Once In Vim Editor

ostechnix.com/comment-multiple

#Linux #editor #vimtips #vim

Last updated 4 years ago

OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social
OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social
nadja · @dequbed
51 followers · 347 posts · Server mastodon.chaosfield.at

If you scroll over wrapped lines using j/k you may notice your cursor jumping over the wrapped part of the line because vim ignores wrapping. If you use gj/gk vim will instead put the cursor on the next line *visually*, taking wrapping into account. You can make this behaviour default too by putting `map j gj` and `map k gk` into your vimrc.

#vimtips

Last updated 5 years ago

nadja · @dequbed
51 followers · 347 posts · Server mastodon.chaosfield.at

`:w(rite)` work for selections: You can select some lines in visual mode and use `:w /some/filename` to only write the selected lines into that file.
Also you can use `:r(ead) /some/filename` to read a file — or even use `:r(ead) !/some/command` to include the stdout of that program.

#vimtips

Last updated 5 years ago

nadja · @dequbed
51 followers · 347 posts · Server mastodon.chaosfield.at

You can open many types of compressed files directly: `(n)vim data.zip` and `(n)vim data.tar.gz` will let you open, edit &save files within the archive — if your distribution includes zip.vim and tar.vim respectively.

#vimtips

Last updated 5 years ago