det.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon Server des Unterhaltungsfernsehen Ehrenfeld zum dezentralen Diskurs.

Administered by:

Server stats:

2.3K
active users

#vim

11 posts11 participants0 posts today

Just learned a neat new vim hack:

!xdg-open <cfile>

Got a http link under your cursor? PDF filename? Literally anything that xdg-open needs to know about?

^^^ :!xdg-open <cfile> will open it in your system browser.

Neato!

#vim#xdg#linux

So I’ve been using vi for over three decades now, and vim was often the flavor of vi being used.

I just noticed that when editing a compressed file in vim (e.g. vim foo.gz), the implicit decompression step is entered into the undo log. You can hit u right after file load and get the compressed binary data.

Huh.

Some important acronyms to know. Feel free to add some of your own.

Lisp:
Logic In Symbolic Paradigms
Lisp Inspires Strange People
Lisp Is Secretly Perfect

Python:
Pseudocode You’d Teach Hordes Of Newbies
Probably You'll Try Harder On Next-lang
Python: You'd Think Hardware's Optional Now

Emacs:
Editor Maintained As Community Shrine
Ecosystem Mainly Acquired by Cult Sysadmins
Emacs Means Always Configuring Something

Vim:
Vaguely Interactive Misery
Very Irritating Macros
Vim Isn't Modern

Linux:
Legendary Interface, Notoriously Unforgiving eXperience
Loyal In Nature, Unmatched eXtensibility
Linux Is Natural Under X

#emacs#vim#linux
Replied in thread

@vimtips Note: `pbcopy` is Mac only. For people on Linux or Windoze, you can use vim's registers as described here:

vi.stackexchange.com/a/96

As the comment says, this needs vim compiled with +clipboard support (check with `vim --version`).

I recommend setting up bindings for these in your vimrc, e. g. for keeping Ctrl-C/V/X. #vim

Vi and Vim Stack ExchangeHow can I copy text to the system clipboard from Vim?Is there a way to copy a block of text to the system clipboard, so I can paste it in another program?

Edit: Solved, see my answer in the thread! Thanks everyone, you are awesome!

Dear #emacs users,

I am trying to re-learn emacs after using #vim for several years.

One thing that I really liked in vim is that I can "reformat" long lines in a #markdown file by marking the lines (VISUAL mode) and then hitting "gq". This kept the markdown format, e.g. lists are still lists, but the lines are wrapped at whatever I set as the maximum line length.

It seems I am missing the right search terms because I only find "M-q" aka fill-paragraph, but this does not respect e.g. markdown lists.

Does anyone have pointers or search terms for me?

#vim-Setting des Tages:

:se wrap|se lbr|se breakindent|se breakindentopt=column:8

automatischer Zeilenumbruch (an Wortgrenzen, nicht mittendrin) aktivieren (aber nur visueller Umbruch, nicht in der Datei selber → :se autoformat)

Und die gewräppten Zeilen dann ab Spalte 8 anzeigen (nicht linker Rand).