serhii.net

In the middle of the desert you can say anything you want

09 Sep 2020

Day 618

Random / Interesting

vim regex separator

I have been using \s as “word separator”, this is wrong. \s in vim is just a whitespace character - so tabs, spaces etc. For what I usually want, \A is any non-alphabetic-character. (\a being an alphabetic one).

vim regex inverse match capturing group + ‘very magic’ mode

/\vcat (dog)@!
/cat \(dog\)\@!

First one is very magic, second is the same without it. @! is a negative match to the preceding capturing group (could have been (\1) too).

\v activates “very magic” mode where everything except letters and underscore has special meaning. This is actually going to be very handy. 1

I’ve actually been using regexes quite a lot lately, have no idea how I lived without them when parsing very big log and text files.

vim paste last searched regex

:s/<Ctrl-R>/ inserts the last searched for regex between the slashes. This is wonderful and no more copypasting stuff! 1

Intellij idea checkstyle tests

In settings, you can configure checkstyle to run everywhere [not] including tests. If you don’t include tests, you won’t get to ‘run checkstyle on the current file’.

i3 vertical tabbed windows

If I have windows that are tabs stacked vertically to make it not-a-tab-anymore I just have to move it one level above or below tabs. If it’s stack 3/3, amking it 4/3 would make it the bottom part of a split whose top part is vertical tabs.

zsh evil registers

Intellij idea read-only decompiled class sources

.. predictably, “Download sources” makes them downloaded, readable and debuggable.

Also nice is the “Alternative source available for” - todo understand how exactly do poms, sources, etc etc etc. play with all this. I assume if maven module wants X, and X can be found in maven and in the list of dependencies in Intellij, I get this choice?

Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus