Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 04, 2016, 06:21:21 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Article Convinces Me To Move To vi(m)  (Read 11102 times)

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Article Convinces Me To Move To vi(m)
« on: January 08, 2008, 09:57:26 AM »
Today one of the python blogs I read posted about an article they thought was the "Best Vim Article Ever". It has convinced me to (as often as possible) use vim for the next three months and see if it sticks.

Why, oh WHY, do those #-@! nutheads use vi-_1199807528593.pngArticle Convinces Me To Move To vi(m)

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #1 on: January 08, 2008, 10:07:52 AM »
Downloading now...

GVim Portable Home Page
http://portablegvim.sourceforge.net/
gvimportable.png

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #2 on: January 08, 2008, 10:47:53 AM »
Interesting article, even for those that (like me) already use vim ;)

It gave me a few cool tips, which i'll now proceed to practice :P

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #3 on: January 08, 2008, 11:12:29 AM »
Welcome.
If you experience changes, like you can move object with your mind, you are on the right path to enlightenment.

Beware of the power of vim though. If you start typing normally thinking you are in insert mode, while being in normal mode, you may send a rocket to the moon.

Also, to learn new commands, it's a good idea to roll your forehead on the keyboard and look at the results.

Just kidding. Join the #vim channel at freenode if you need help.

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #4 on: January 08, 2008, 11:16:23 AM »
I guess I should add, to give you all some context, I am not a VIrgin. I use it as my main editor with working with files on a *nix box. However, I am only at the near side of intermediate user level. I should really be saying that by using it fulltime I hope to move beyond the basics. Any software, when only used at the basic level, will never give you an understanding of the software's worth. It would also be a useless exercise to switch applications if you aren't ever going to go beyond the basics.

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #5 on: January 08, 2008, 12:15:49 PM »
Damn, I assumed the convincing powers of the article were extraordinary.
Welcome back, then.

tranglos

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,079
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #6 on: January 08, 2008, 12:55:20 PM »
Heh, the graphic referenced at the end of the article is both hilarius and probably true:
http://www.bemroses....et/images/curves.jpg


tranglos

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,079
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #7 on: January 08, 2008, 03:18:09 PM »
Today one of the python blogs I read posted about an article they thought was the "Best Vim Article Ever". It has convinced me to (as often as possible) use vim for the next three months and see if it sticks.

Darn, this is the best Vim article ever! It almost convinces me to give it one more try - although in the case of (g)Vim "try" is probably not a good strategy. A better idea would be to erase all other editors from the system first :)

I recall the last time I gave up on gvim was when I was reading through the manual and found a section, not too far into the document, about how, if you want to sort text, you can invoke the shell and run the sort command. I stopped reading at that line, uninstalled the whole thing and promised myself never to waste time with 30-year-old Unix tools again. It reminded me of Linux users ridiculing Windows for requiring restart on driver installation, but when I first installed RedHat (granted, about 10 years ago) I had to recompile the kernel before it recognized the sound card - at least the docs said it had to be done.

Still, the article is really informative as far as evangelizing goes. Unlike the author, I really have no trouble with finding arrow keys on my keyboards, but it does makes me yearn for the power of navigation. If only it weren't so ugly and angular :)

So here's an idea that I'm sure Vim people will totally scorn, but let me try it anyway. How about reversing the Vim paradigm and have a GUI editor that behaves in standard Windowsy ways, but also includes a command interface? It would be a little more verbose than Vim, of course: hit ESC to enter the command mode, type the command, press Enter to accept it. (This is your clue to start ROTFLing!)

At one point I  did exactly that for my abortive attempt at rewriting KeyNote. I wanted to make the UI entirely configurable  and scriptable from the word go, so nothing was hardcoded. The menus were built  from XML files, and all commands had textual representation. There was a command handling engine patterned after Windows message passing mechanisms, which meant that the engine didn't care where the commands were coming from: menus, keyboard, scripts or macros, and macros could be easily recorded and replayed. It was really nice, because there was really no distinction between built-in commands and macros or commands with custom parameters. The regular File|Open command would be something like {cmdOpen} for example, and you could add {cmdOpen file="foo.txt" readonly="true"} as a menu item anywhere. Some parameters had default values and were optional (here: readonly), others required a value (here: file), so if you wanted to have a custom Open command that would always open a file in read-only mode, you would specify {cmdOpen readonly="true"}, and the program would prompt you for all the missing required params.

So while I was testing this, I added a command line to see how various commands were interpreted. Now, this particular implementation was of course awfully verbose, because it was meant to be used in  UI layouts and scripts. You would not normally want to type {navigate direction="right" distance="42"}, but the principle remains. Apart from the lengthy typing, it was a fun way to use a program, and certainly great for debugging the command handler. Given a suitably concise command language, perhaps modeled after Vim, might it not be an interesting way of providing some of Vim's keyboarding power while not forcing users to abandon the familiar GUI-ness of Windows programs?






housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #8 on: January 08, 2008, 03:46:55 PM »
Indeed quite a convincing article! I even learned something new and very useful  :Thmbsup:

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #9 on: January 08, 2008, 04:36:44 PM »
@tranglos: try cream?

tranglos

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,079
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #10 on: January 08, 2008, 05:27:08 PM »
@tranglos: try cream?

I did, but then there's little point to using Vim (or friends) for the menus and toolbars, unless I'm missing something about Cream's capabilities. The feature list is lengthy, but it doesn't seem to add anything EmEditor or the like won't already do. When I was trying out Vim, I actually used the console version the most, so as to concentrate on the keyboard and because the menus in gVim only add more weirdness to the package.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #11 on: January 08, 2008, 06:29:14 PM »
Heh, the graphic referenced at the end of the article is both hilarius and probably true:
http://www.bemroses....et/images/curves.jpg
Heh, I find their Visual Studio curve silly.

Personally I tend to do nano when I'm on *u*x, since I only need very simple config editing, and the first editor I got comfortable with was pico (which nano mimics/surpasses). I'm comfortable enough with VIM if nano isn't present, but for some reason 'nano' is hardwired in my fingers when I start the mental "launch editor" thought train.

I tried VIM for a while on windows, and there's features about it that's pretty nice, but I ended up with Notepad++ at the end of the day (well, the VIM adventure lasted a month or so...). Why? VIM is heavier than N++, and doesn't really offer me much I can't do easily enough with N++; I can easy cut/delete/duplicate current line, delete current word, delete to end of line etc. It might require some ctrl+whatever combinations, but that's not really too bad, and in VIM I'd have to exit insert mode anyway. I also find selections a bit more intuitive in N++. Oh, and it's easy for me to write a plugin if I want to, although it does require writing a DLL and restarting N++, there isn't any scripting language.

I'll read the article when I have time, though :)
- carpe noctem

Lashiec

  • Member
  • Joined in 2006
  • **
  • Posts: 2,374
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #12 on: January 08, 2008, 06:46:48 PM »
I prefer pico as well, if it's installed *and* if they let us use it. For example, for multithreading programming in C is the thing they recommend us to use, as we access the Debian server via PuTTY, that means no graphical interface, nor decent text editor... but they force us to use Vi for Unix shell programming >_< (curiously, I remember it harder to use). Still, both drive me nuts when I hit the Numpad...

* Lashiec resists assimilation

Of course, when I am in Windows or using a graphical Linux distro, I stay away from dinosaur-editors :P
« Last Edit: January 11, 2008, 07:18:41 AM by Lashiec »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #13 on: January 08, 2008, 06:50:33 PM »
Why pico instead of nano? And why no VIM? If I had to do coding, I'd certainly prefer VIM over nano :)

And why the heck are you forced to access systems remotely for a programming class? O_o
- carpe noctem

Lashiec

  • Member
  • Joined in 2006
  • **
  • Posts: 2,374
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #14 on: January 08, 2008, 06:58:41 PM »
Because we're forced to do that. I don't know if the nano package is installed in the Debian that runs the server, never bothered to try.

Good question, considering that all computers in the different classes have Ubuntu installed, but still they force us to access the Debian server, in multiuser fashion, and hack programs there. It's only for one subject, though, in most of the others we use normal tools :)

And considering the advice they gave us over how bad programmed multithreaded routines can bring the server to its knees... well, I guess they like to play with fire ;D

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,220
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #15 on: January 10, 2008, 11:29:22 PM »
Hmmm... You guys have me curious... I'll give that article a read with an open mind... Despite remembering how over-joyed I was when I left vi years ago... We'll see...
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #16 on: May 01, 2009, 12:08:58 AM »
bump, hey guys does anyone know a working solution for making vim and python play nicely? In other words I am trying to configure Vim to be Python friendly. I have the syntax, coloring, tabs etc set up fine. But I cannot find a way to run the .py script within Vim. I was hoping that I could also get python shell inside Vim, not possible?

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #17 on: May 01, 2009, 06:24:33 AM »
Quote
get python shell inside Vim, not possible?
No that I know of.

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #18 on: May 01, 2009, 09:29:31 AM »
If you use pida, you get vim and a python shell: http://pida.co.uk/

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #19 on: May 01, 2009, 10:41:14 AM »
only on *nix.
Another nifty trick to communicate with the python interactive console is to use screen.
There's a vim script somewhere that automates this.

But I assume we are on  windows?

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #20 on: May 01, 2009, 11:31:20 AM »
I have found eclipse+vim solution, it works well. It is not a full solution but it lets you open your choice of extension in vim inside eclipse

http://vimplugin.org/

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #21 on: May 01, 2009, 12:33:51 PM »
Hmm, I think I looked into vimplugin and had some problems. But that was too long ago for me to remember the details. However, it appears that the latest versions is one from 2007, and I know I looked at this somewhere around 12 months ago.

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #22 on: May 01, 2009, 12:57:52 PM »
Has anyone tried this one?

http://eclim.sourceforge.net/

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #23 on: May 01, 2009, 04:19:16 PM »
I also found this one which is great of you are into Eclipse


http://vrapper.sourceforge.net/home/

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Article Convinces Me To Move To vi(m)
« Reply #24 on: May 01, 2009, 05:54:23 PM »
I'll try both of them and maybe I'll even remember to post back with my findings :)

thanks for the hints, kartal