News for hackers. Stuff that matters.

nkouevda

Re:My Favorite Vim Oneliners for Text Manipulation on Sunday August 06, 2023 @12:16AM (#37018938)
fyi _ is a built-in motion; that plugin defines a couple others: il and al, which are specifically characterwise (vs. _ can be either that or linewise)

gq is a linewise operation anyway, so gq_, gqil, and gqal all have the same effect

Re:iTerm2 Version 3 Now in Beta on Friday February 19, 2016 @07:38AM (#11133122)
> Triple-clicking in Terminal.app will select from the previous \n to the next \n (i.e. it will select multiple lines if the lines are wrapped), while triple-clicking in iTerm2 will select only that line.

In iTerm2, toggle "Triple-click selects full wrapped lines" in the Pointer tab in Preferences.

Re:Fish shell on Monday May 18, 2015 @09:42PM (#9567767)
> When you start typing a command-line in Fish that matches a previously-typed command, it automatically shows the rest of the line as an available completion, and pressing ^F or the right arrow will complete it for you.

^R is more powerful, though; it matches at any point in previous commands, not just at the beginning.

> The lack of this functionality actually really kills my ability to use any other shell.

You can achieve that behavior in readline (which is used by bash, python shell, etc.) by changing the up/down arrows from previous-history/next-history to history-search-backward/history-search-forward. In ~/.inputrc:

  "\e[A": history-search-backward
  "\e[B": history-search-forward
Note that you can still use ^P/^N for previous-history/next-history (or you can remap "\C-p"/"\C-n" as well).
Re:Stop using tail -f (mostly) on Monday March 30, 2015 @03:35PM (#9292000)
Note that -C is in each direction, not total; -C20 is equivalent to -A20 -B20.
Re:Unix Tricks on Thursday July 03, 2014 @12:48PM (#7984154)
You can also use the following options to see and edit all expansions before running a command:

    shopt -s histverify histreedit
Re::wq on Sunday May 25, 2014 @11:49PM (#7798604)
:w:w would accomplish that.