Hot answers tagged

5

Stack Overflow and other Stack Exchange sites, like many other websites with embedded editors, bind various keyboard chords to editing commands. These are sometimes called access keys (if you want to do a web search) and are bound when the page is loaded. In your case, Vimperator's default keymap for editing a HTML text area in an external editor, Ctrl-i, is ...


2

The simplest way to format the whole file would be to run: gggqG The gg moves to the start of the file and the gqG formats all the lines between the current position and the last line of the file (G). However, this can result in some lines (not separated by an empty line) being treated as belonging to the same paragraph and being joined to each other, ...


2

Explaining this behaviour Syntax highlighting is meant to modify a colour scheme. The default SAS syntax highlighting is meant to modify a normal colour scheme, like I use, and then it is suitable to show data as blue on white. On a reverse video scheme, like koehler, it is not. When you change your colour scheme to a normal one, vim throws away your ...


2

Ah, lord, somebody in #vim on Freenode helped me out: that line going around is bugged, because ; doesn't mean subsequent-command in Vim. The following works as intended: mvim --remote-silent +":%line | silent foldo!" "%file"


1

IntelliJ has nice Vim plugin, and it supports vimrc. Ofc it's not 100% compatible but like 85-90% which is greater. IDE itself is not free but you can use development version which is pretty stable https://www.jetbrains.com/idea/ The other nice solution as @romainl mention is Eclim http://eclim.org/ It gives you IDE power in your Vim.


1

If you do the usual normal mode deletion from the beginning [of the sentence] with [count]dw, your cursor will already be on the new first word. Then, a simple ~ will toggle its case. I think it can't get any simpler than that! Sure, you could write a custom command (but handling the motion like d{motion} isn't trivial to implement), but you'd probably have ...


1

See :help i_CTRL-V_digit. You need to start the sequence with an upper-case U, because the cat emoji is outside the basic multilingual plane (the codepoints from U+0000 to U+FFFF).


1

Anthony's answer is straight to the point. However, you can also use ggvG to highlight the entire file. The gg moves at the beginning and vG highlights until the end of the file.


1

In a terminal, control@ and controlspace are almost always the same: the control modifier tells the terminal to strip off bits above the low-order 5. The code for @ is 0x40, and that for space is 0x20. The low-order bits would be 0x1f — and those bits are zero in @ and space. So both produce an ASCII NUL (0).



Only top voted, non community-wiki answers of a minimum length are eligible