September 13, 2013
On Fri, Sep 13, 2013 at 09:48:05PM +0000, Justin Whear wrote:
> On Fri, 13 Sep 2013 14:29:02 -0700, H. S. Teoh wrote:
> 
> > vim (and all vi-derived editors) is... shall we say, a unique beast all its own. It requires a different *mode* of thinking (har har) than your usual GUI-based editors.  In most other editors, you think in terms of "move cursor here, type some characters, move cursor there, hit delete a few times", etc..  But in vi(m), you operate on a different level of abstraction. Rather than thinking in terms of individual cursor movements and single-character operations, you're thinking in terms of abstract editing operations: "go to the word that begins with 'vo', replace the word with 'int', go back to the start of the paragraph, open a new line of text above it", etc..
> 
> I've introduced a few young developers to Vim and the major hole that they tend to fall into is printing out a list of vim "keyboard shortcuts", because that's how other editors work: you memorize a bunch of arbitrary key combinations.  So the thing that I emphasize is learning Vim's *language*.

Mmm, I like that description! You're right, it's actually a language, not just a bunch of shortcuts. That's why is far more expressive than a shortcut-based editor. You'd need an exponential number of shortcuts just to keep up with all the possibilities -- clearly impractical.


> Say you already know that "d" means delete--whenever you learn a new
> noun such as "e" (end of word), you can combine the two:  "de" (delete
> to end of the word).  The same applies when you learn a new verb, e.g.
> "y" for "yank" (copy): "ye" copies from the cursor to the end of the
> word.  Then mix it up with adjectives like counts ("d5e", delete to
> five word endings) or "i" and "a" (inside and around, "di{" for
> "delete inside this block").

Heh. Can you believe this is the first time I've heard of 'e', in spite of having used vim for more than a decade? ;-) Here I've been using w and W and thinking they were good enough... I learned something new today.


T

-- 
MAS = Mana Ada Sistem?
September 13, 2013
On Friday, 13 September 2013 at 22:07:05 UTC, Jonathan M Davis wrote:
> I don't actually use any of the GUI controls. It's just useful to have vim in a window that I can resize

xterms can resize too!

Though, sometimes the window resize signal gets lost. I resize the window while one program is running, then go back to bash and the readline editing is broken until i resize again. Aargh.

But vim handles it quite well. Though gvim isn't bad, I used it for a while, I just like being able to use it with screen too.
September 13, 2013
Windows:VisualStudio Eclipse VIM  Notepad++
*nix:  Eclipse VIM Kate Monodevelop
September 13, 2013
On Fri, 13 Sep 2013 14:36:16 -0700
"H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote:
> 
> So I set up my MX to deliver
> all mail to my PC, and I check mail with ssh/mutt. Nowadays I can even
> do this from my Android phone, though the low resolution and lack of a
> real keyboard does make it rather awkward to use.
> 

I once received notice about, investigated and fixed, a web server problem entirely by dual-wielding an Android and an iPhone while sitting in a McDonald's for a few minutes (it was admittedly a simple problem, and luckily I had already set up both with ssh keys for the server). I thought that was pretty damn cool, even though doing the same on my PC would have been much quicker and easier. It's no secret I'm not a fan of those devices, but their benefit is that they do serve as a shitty version of a Palm PDA...except with full internet access.

>Never ascribe to malice that which is adequately explained by incompetence. -- Napoleon Bonaparte

I've been such a big believer in that quote for years. Never heard it associated with Napoleon though, I always just knew it as "Hanlon's Razor": https://en.wikipedia.org/wiki/Hanlon%27s_razor

September 13, 2013
On 9/13/2013 3:06 PM, Jonathan M Davis wrote:
> Vim's learning curve is quite nasty, but I definitely think that it was worth
> it.

I use Vim to edit ME source files so it'll compile on the target machine.

September 13, 2013
On Fri, 13 Sep 2013 23:30:55 +0200
"Namespace" <rswhite4@googlemail.com> wrote:
> 
> I'm suprised that so few use an IDE. :D

I think IDE users have been avoiding D due to (perceived?) issues with D's IDE support. So those of us that do use D tend to be the ones who don't rely on IDEs. "Chicken and egg"

September 13, 2013
On Fri, 13 Sep 2013 18:06:50 -0400, Jonathan M Davis wrote:
> I don't actually use any of the GUI controls. It's just useful to have vim in a window that I can resize (you also get better color choices than in the shell).

Yeah, my .gvimrc is basically just turning off all the GUI elements, the very first thing I did when I started using it.  I use gvim when working locally for only two reasons: full color support and resizing splits quickly with the mouse.
September 13, 2013
On Sat, Sep 14, 2013 at 12:09:35AM +0200, Adam D. Ruppe wrote:
> On Friday, 13 September 2013 at 21:45:06 UTC, H. S. Teoh wrote:
> >Xterm has a 256-color mode that can be used for subtler
> 
> You can do a palette swap in hardware text mode too (fiddling the
> vga palette registers, I think it is the same as in mode 13h but
> it's been a looooong time since I've played with that), the linux
> console in vga text mode (see man console_codes(4)), and in Windows
> console:
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms686039%28v=vs.85%29.aspx
> 
> 
> Perhaps bad practice to change that stuff, at least not without changing it back when you're done, but it is doable.
> 
> 
> Actually, my biggest problem with linux is how terrible the operating system is compared to DOS and Windows. I'm not even kidding, the unix terminal debacle sucks (maybe good when you had various hardware, but it is weak next to what the PC hardware offers), the available system facilities suck (Win32 is plenty usable and reliably there! Even on linux, using a Windows .exe tends to work better than using a linux binary - exe's just work there thanks to wine, whereas linux binaries always have some incompatibility).

Really?  The only time I've actually had trouble with linux binaries is when there's a problem with libc upgrades (the most disastrous one being the libc5 -> libc6 upgrade, as I remember it). On Windows, when installing stuff I used to always get messages like "this installer wants to overwrite the file C:\\windows\system\asdf1234.dll, proceed (y/n)?" -- which totally freaks me out. I mean, I don't even know what on earth that file is supposed to do, and to top it off it's often the same few files that every other installer and his neighbour's download utility wants to overwrite for no discernible reason. They don't call it "DLL hell" for no reason, I suppose. And then once I make the choice just by pure blind guessing, the installation just barges onward with no indication whatsoever as to whether it actually worked, or some subtle problem was introduced to the system. Needless to say, I find myself reformatting and reinstalling windows all the time, which I suspect is due to these kinds of dependency problems. (But TBH, the last time I touched windows in any serious way was almost 15 years ago, so none of the above may be true anymore.)

Having said that, though, linux *is* more geared to building from source than anything else, so downloading random "linux" binaries tends to not work very well. Manually downloading binaries is a windows-centric concept, methinks. It works OK when there's only a small number of possible OS configurations in Windows (esp. with MS's obsession with backward-compatibility), but linux's customizability means you're dealing with an exponential number of mutually-incompatible OS configurations -- binary compatibility goes out the window right there.

Building from source, OTOH, tends to work pretty well, if you can get the thing to compile at all. (Thanks to apt-get, this is relatively painless nowadays, once you figure out which libraries are needed... I remember the early days before apt was born. It was a nightmare chasing down all those package dependencies *transitively*, esp. when I had to use sneakernet to download packages from my school's network due to a 2400 baud internet connection at home -- impractical for downloading big source packages.) Nowadays, with people finally learning how to handle .so versioning and ABI compatibility properly, these kinds of problems are no longer a big issue for me, as long as I can build from source. Binary distribution is still a royal pain, though. IMO it *inherently* doesn't work very well in the linux ecosystem, which is definitely more favorable towards open source software.


> Eh I'm getting off topic.

Isn't this thread already [OT]? ;-)


T

-- 
Obviously, some things aren't very obvious.
September 13, 2013
On 9/13/13 3:09 PM, Adam D. Ruppe wrote:
> Actually, my biggest problem with linux is how terrible the operating
> system is compared to DOS and Windows. I'm not even kidding, the unix
> terminal debacle sucks (maybe good when you had various hardware, but it
> is weak next to what the PC hardware offers), the available system
> facilities suck (Win32 is plenty usable and reliably there! Even on
> linux, using a Windows .exe tends to work better than using a linux
> binary - exe's just work there thanks to wine, whereas linux binaries
> always have some incompatibility).

Sure... wait, what?

It's like I woke up and it's backward day :o). http://en.wikipedia.org/wiki/Backwards_(Red_Dwarf_episode)


Andrei

September 13, 2013
On Sat, 14 Sep 2013 00:10:30 +0200, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:

> Heh. Can you believe this is the first time I've heard of 'e', in spite
> of having used vim for more than a decade?  Here I've been using w
> and W and thinking they were good enough... I learned something new
> today.

Just to share: Bram Molenaar about '7 Habits For Effective Text Editing 2.0' http://youtu.be/eX9m3g5J-XA of course using vim.

You might learn more than one thing ;-)