What's the deal with Deno? We talk with a major contributor to find out. Listen now.

New answers tagged

1

The other answers using :move haven't considered the edge case where you are on the first line or last line of the buffer and press the shortcut, you will see error messages saying the address is invalid. To avoid this error message, I have written a simple function to deal with the edge cases: fun SwitchLine(src_line_idx, direction) if a:direction ==# '...


1

While compiling your own Vim can have some benefits (such as upgrading you to the latest version, in your case from 8.1.2269 to 8.2.1707), it's often hard to get it right. For instance, in your case, you're missing the +clipboard feature that will allow you to use the integration with the X11 clipboard, which is what usually implements the "* and "+...


0

Plugin vim-tmux-clipboard seems to be what you're after. It mirrors Vim's unnamed register (default one for yank, delete and put operations) to and from the tmux clipboard. Make sure you take a close look at the requirements when enabling this plug-in. For Vim, you need at least version 8.0.1394 and you also need plug-in vim-tmux-focus-events to be enabled. (...


1

Surround has a philosophy of being very « vim-like »—it uses operators to work on objects, much like many of vim’s most powerful normal mode constructs. I would argue that it is not what some expect because they expect an auto-pairs-like experience that they are used to from other editors, or because they are still learning about normal-mode and the many ...


3

yank is an operator like d and c, which means it works on all motions and text-objects (see the relevant help sections). That means that yip, y), ygg, yib, y/pattern<CR>, yfc etc., all work (and with registers, too)! They can potentially be multiple lines. In this case I would probably use yj (and not y2j) because yank will include the current line and ...


4

One thought that occurs to me: yank the text (y), and then paste it at the :grep command: :grep <C-r>" ... Note that this doesn't work too well for multi-line selections, and you may want something more like <C-r>=escape(@", '/\')<CR> to handle some escape sequences. I'm making use of the "insert register" keystroke (:...


Top 50 recent answers are included