Duaine Hechler said the following on 02/28/2013 04:56 PM:
On 02/28/2013 03:13 PM, Anton Aylward wrote:
Duaine Hechler said the following on 02/28/2013 03:54 PM:
On 02/28/2013 02:42 PM, Anton Aylward wrote:
[..] So, can you do move lines 827 though 844 to before line 212 in one go? Trivial in VI (and variants).
Well, I'm not that deep in VI and maybe so BUT its not as simple as the other editors !
It would take
:827,844m212
I don't see that as complicated.
I you wanted to do it graphically, the key strokes might be
827G17dd212Gp
That is, Goto line 827 Yank into the transient buffer 17 lines while deleting them Goto like 212 Put the contents of the transient buffer after the current line.
Again, its called easy of use. In the other editor, you don't NEED to know the LINE NUMBERS + again, CRYPTIC !!!!!
Again, you are missing the point - its called "easy of use" - at the editor command line (while editing the file) - I just say "hex on" or "hex off" - NO "ESC + :" - or - "ctrl" - or any CRYPTIC shit.
Please: don't reply to BOTH me AND the list. Its redundant. As for 'ease of use', that's a matter of opinion. There's nothing cryptic about single letter abbreviations - G for goto, m for move, p for put, d for delete and so forth. The more 'obscure' abbreviations - ctl or meta - are because the users want speed and something like 'go to command line mode, type explicit words' is a but unwieldy for a 'common command'. VI only does that for 'settings'. As for line numbers, I thought you were boasting earlier that those mainframe line editors showed line numbers. VI only does if you explicitly ask it to. As I said, mostly you deal with the syntax. I only illustrated with line numbers since that is independent of language. Normally when I 'shuffle' stuff in VI I use the pattern capability or the marker capability. But you're probably call that 'cryptic'. But its the normal way of working with VI. As I said, so many *NIX languages use "{ ... }" bracketing that its normal to put the cursor on one bracket, VI finds the matching one, and you do an operation on what's in between. You can redefine - per language - what VI thinks of as a 'paragraph' and delimiters, break markers, comment strings and so forth. Line numbers are normally for when you're talking to someone else as in "you have a bug at line 1243" ... that's comment across all architectures! I recall when the PC and MS-DOS proliferated, there were keyboard templates for things like WordPerfect that gave the mnemonics for the function keys. GEE WOW! UNIX grew up with a terminal independent environment, not like your dedicated IBM terminals. The reason for TERMCAP et al was that the programmers didn't know what terminal applicability a program could expect. So we relied on things like ctl key sequences that could be types on ANY terminal. That you now have a 105-key PC keyboard and 9-button mouse with 3-d scroll-wheel is fortunate. But we didn't have any of that back when it was a cheap terminal that incorrectly and incompletely emulated a VT-100. It's nice that modern VI will allow you to re-define just about any sequence you want. -- This isn't life in the fast lane, it's life in the oncoming traffic. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org