Vim movement on other programs [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I'm learning Vim and with it came the urge to use 'hjkl' and friends on every other program, including mouse operated programs like browsers.
How can I use these keyboard shortcuts, or something similar?
I'm using Linux.

Off the top of my head...
Vimperator for Firefox.
Awesome, WMII, Xmonad or ion3 window manager.
Evince supports hjkl.
vifm filemanager
there are vi keybindings for readline, which enables them for many terminal apps
xzgv image viewer

Gmail and several of the other Google apps natively support Vi-like motions.
Also, you might want to try Vimperator and, most definitely, Nethack!

Give scrotwm a try. It's a tiling window manager with vim-like bindings by default, written by coders who use vim!
And vimperator for Firefox makes my life much, much easier.
For Bourne-like shells (ksh, bash, ...) try set -o vi to make your command line use vi keys.

File manager with vi movement key-bindings and much more: ranger.

If you use Eclipse, then viPlugin is the best vi-like editor for it.
I always stick the following two lines in my /etc/inputrc (or ~/.inputrc if I don't have root access):
set editing-mode vi
set keymap vi

Zathura is a nice and small pdf reader and with built-in vim-like commands.
It feels like you opened your pdf document in vim. (e.g.: the ':' button brings up the same prompt.)

Others:
ViEmu: plugin for Visual Studio, Word, Outlook, and SQL Server
Komodo Edit: developer's editor
AbiWord: word processor
Editra: developer's editor
VimPlugin: plug Vim into Eclipse. I couldn't get it working under Windows or Mac OS X.
Eclim: another Vim plugin for Eclipse.
Viper: Old vi emulator for Emacs
Evil: Recent Vim emulator for Emacs
IdeaVim: Vim emulator for the IntelliJ family of editors, RubyMine, PyCharm, etc.

Okular, the PDF reader of KDE 4 supports HJKL.

Viper works, but if you're used to Vim, it is lacking a lot of keybindings that will end up messing you up. Theres also jvi for Netbeans, which I find more complete than the Eclipse plugins. Kate also recently added Vi-emulation mode
I also consider xmonad, to be superior to Awesome, Ion etc.

Vimium for Google Chrome.

Check out:
dwb — a web browser
ranger — a terminal-based file manager
Zathura — a PDF viewer
Vimium — a vim keybindings extension for Chrome(ium)
Evil — the (in)famous Emacs plugin that turns Emacs into Vim, if you ever feel the need to do that
i3, xmonad, dwm — tiling window managers that are controlled from the keyboard

Lightweight (30k zpi) FimFx for Firefox - does less than Vimperator, but for a good reason.

For xpdf, add these to your ~/.xpdfrc:
bind h any scrollLeft(35)
bind l any scrollRight(35)
bind k any scrollUpPrevPage(35)
bind j any scrollDownNextPage(35)
bind ctrl-f any scrollDownNextPage(320)
bind ctrl-b any scrollUpPrevPage(320)
bind ctrl-d any scrollDownNextPage(160)
bind ctrl-u any scrollUpPrevPage(160)
bind g any gotoPage(1)
bind G any gotoLastPage
bind / any find

You can use xmodmap to make win+hjkl to work as arrow keys.
Make a file named Xmodmap. Add the following content:
keycode 133 = Mode_switch
keysym j = j J Down
keysym l = l L Right
keysym h = h H Left
keysym k = k K Up
Load it using xmodmap Xmodmap
Note: Run xev to find out keycode for win key. 133 is just an example.

Qutebrowser hasn't been mentioned, which is much better than the plugins.

I used Ion as a window manager on Linux for a while. It uses keybindings similar to Vim to move between windows, if I recall correctly. It won't make your apps support hjkl movement, but the window manager is a place to start.

Apart from the already mentioned, you could also bind those keys to left... nd so on (with ahk). I've also noticed that several web apps use that movement keys (gmail, greader, ....)

Try keynav, for controlling the mouse pointer using your keyboard.
http://www.semicomplete.com/projects/keynav/

VisVim for Visual Studio
CubicleVim for outlook

If you use mpd for listening to music, then I strongly recommend PIM

Google Reader respects jk keybindings. I'm sure there are more that they support - feel free to edit my answer.

Mutt - mail client - can be configured to move hjkl, i configure some more vim keys. take some time to configure as it's a bit different from other mail clients. Mutt is not Muttator, is a terminal GUI application.

cVim for chrome is awesome. I am currently using it.
https://github.com/1995eaton/chromium-vim

Shortcut Manager extension for chrome.
You can use something like this to configure basic vim movement keys:
// ==UserScript==
// #ShortcutManager
// #name Scroll up by 25 pixels
// #key k
// #include *
// #exclude https://*mail.google.com/*
// #execute ScrollUp(["25"])
// ==/UserScript==
Other useful snippets:
// #key g
// #execute ScrollToTop([])
// #key Shift+g
// #execute ScrollToBottom([])

How to get Vim keybindings in Adobe Reader on SuperUser
(my answer to that question is an AutoHotKey script that will even get you proper search functionality with /, n, and N, but admittedly I haven't verified a port to Linux or Mac yet)

Related

Trying to use xdebug on vim

I'm trying to use xdebug with vim on linux. I follow the instructions to install xdebug and after that I can see the information about xdebug if I call phpinfo() from a file inside the apache server.
After open a file in vim, it is supposed that when I press F5 it should show something like "waiting for a new connection on port 9000 for 10 seconds...", but it doesn't show anything..
Any idea?
I would recommend you look at a new vim debugger plugin, called vdebug: https://github.com/joonty/vdebug -- it is actively developed and seems very capable.
I had the same sort of problem, it turned out that my terminal emulator was capturing the keypress and not sending it to vim (I think). Remapping the functions to different keys solved the problem.
It could actually be his/her keyboard. If the keyboard has mult-media functions as well as F1-F12 on them... then there is, usually a "F-Lock" key next to the row of function keys that will turn on/off the function key behavior. Really annoying, IMHO, for the new keyboards sold these days.... and rarely does the keyboard have a light to indicate the ulterior operation of said function keys.
I say this cuz, that is exactly what happened to me just now.

Are there any ide's out there with good support for vim/vi bindings?

Finding vim plugin maintenance and configuring is too laborious and relies on external configurations (such as ruby) tricky. What I want is an IDE like Eclipse, Visual Studio, that I can use vim in. I still want to be able to use different modes (command, visual, insert), but I don't want these inbuilt commands to conflict with the IDE's commands.
I've heard PIDA is good for this but looks like a bit of a mission to configure on Mac.
Eclipse has a VIM plugin. Eclipse runs on OS X
http://www.vimplugin.org/
Also, I think the Komodo IDEs and editors have VIM bindings, but I have little experience with them. Apparently, they also run on OS X.
http://docs.activestate.com/komodo/4.4/vikeybind.html
I use Komodo Edit on OS X, Ubuntu and Windows. It's open source, supports a ton of languages and has good Vi/Vim key binding support without getting in the way of itself. It's also easy to add in support for additional key bindings. It's built on the Mozilla code base and can be extended with Add-ons (Remote Drive Tree/Source Tree/MoreKomodo are great examples). I also personally love being able to write macros for myself in either JS or Python to add extra functionality.
The full fledged IDE is worth looking at if you can use the extra features. For most of the things that I work on, I can't use a full fledged remote debugger so Komodo Edit suits my needs.
It also has built in SSH support all in a package that is very responsive on my 5 year old work machine with several 1000 line files open in tabs.
Emacs has a vi emulation mode called Viper ;-)
Besides the vim plugin for Eclipse there is also ViEmu for (amongst others) Visual Studio, if you are not afraid of shelling out some $. Haven't used it though, as vim is my IDE :)
This AutoHotKey script isn't quite what you asked for, but I mention it in case it's helpful.
As you say, PIDA has real Vim, nothing can come close to that. Keybinding emulation only goes so far. It's not that bad to get running on a Mac, Windows is a mission though.
QT creator has Vi bindings.

Reasons for using command line Vim versus GUI Vim [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Background
I'm building an application where it detects what documents you're using from the file system. To do this it must access the AXDocument attribute of the active window. MacVim provides this. Running Vim in the Terminal wouldn't provide this.
I've just put out a survey to ask what editor coders who are interested in my app use. A significant number of the folk using Vim used it directly from the command line.
Why not use a GUI Vim?
Why do some people prefer to run Vim this way versus a GUI implementation like MacVim?
What advantages does this offer? As I understand it, you can send files to MacVim from the command line just as easily as command line Vim.
These reasons may be different for each specific developer but my guess would be:
vim is pretty much vim on any platform. GUI implementations can
vary.
Familiarity - being familiar with vim does not nessecarily mean
being familar with vim wrapped ina
GUI - espectially given #1.
"Elite Complex" ;-)
No definite avantages to the users over cli vim.
One might not have access to a gui (think ssh) or simply force of habit.
Although I don't use any feature exclusive to the GUI version (never touch the mouse while editing) I find GVIM more pleasing to the eye for fonts rendering and color management. So the only reason to use the cli version is not having access to a graphic environment (like when accessing a remote machine via ssh). Using GVIM also allows reuse of the terminal it was called from without having to use screen.
being able to run vim under screen provides
reliability: it will stay alive if X or the terminal app crashes. not sure how applicable this is to the Mac.
the option to multiplex sessions within terminal tabs. I actually end up rarely using terminal tabs because of this. It's possible (albeit a bit confusing) to set up heirarchical screen sessions and move branches of them around. screen is super awesome. This also provides an additional layer of text buffering in which you can search by regexp — this is useful if you spawn a shell command that is pages long and you're looking for a particular word in there.
the ability to connect to an existing session from another computer or reconnect after a network outage
and friends
in addition to making it possible to use screen, the console vim provides better shell integration. Although it's possible to run shell commands from within gvim (again, I'm not sure how this applies to the Mac, I'm a linux guy), there are limitations. I rarely use a gui vim so I'm not sure about the exact limits. For example, ANSI color codes are removed. I find this annoying because I tend to interact with SCM that way, for example running :!git diff --cached to check the changes in the index before committing. It makes for a somewhat quicker and more satisfying (mmm, diffy!) read if it's colourized.
I used to feel that gvim was a big improvement for viewing diffs, but I've changed the background colour of my terminal to a dark non-black shade, and set
:highlight DiffAdd ctermbg=Black
:highlight DiffChange ctermbg=Black
:highlight DiffDelete ctermbg=Black
:highlight DiffText cterm=Bold ctermbg=None
The result of this is that in diff mode, differing text shows up with a black background, and unchanged text is coloured with the terminal background colour. For side-by-side diffs, this works wonderfully, since you can tell immediately based on the other side whether a given line is a change or add; for non-side-by-side you will be able to see an unchanged part in a changed line.
This means that you can leave syntax colouring on and still be able to see diffs. Again, you do need to be able to set the background colour of the terminal to a unique, dark, non-black shade. This facility is available in the terminal emulators that I use (yakuake/konsole and roxterm) and many others.^[?Mac^M"mya)^O^Op
This also assumes that you're using a colourscheme meant for use with a dark background colour; I use a modified delek.
Although I haven't tried this, there is also the option to run console vim in 256-colour mode on terminals which support that mode — which I believe includes most or all modern ones. This can serve to make much of the subtlety of GUI colorschemes available to console vim.^["mp
I also like it that it lives in the place where it was started, and starts up quick. So if I'm navigating around in the shell, as per my wont, I can edit a file without interrupting that flow or having to farm that operation out to a different piece of conceptual real estate. Having less things to keep track of is a big plus. Being able to background it is helpful, too, for example if I need to grab the contents of an unexported shell variable via xclip. If I'd spawned a GUI window instead I might have some trouble remembering where that shell was, or might have already closed it.
My main reason for using a gui vim at all is that it makes somewhat more sense as something spawned from a gui app, eg a browser. In practice I never do this, and I suspect that it's fairly equivalent to just have a new terminal window pop up with a new console vim in it. Though there is likely some (window manager) window management functionality that is exclusive to gui implementations. This is pretty similar to the use case you're discussing.
gvim is actually just a basic terminal emulator with vim running in it, and some menus and toolbar buttons up the top.
So if you have a good, full-featured terminal emulator already, you may as well use that instead, since you'll be using the same type of terminal window that you are familiar with across all your terminal sessions.
Another benefit is that it makes it easy to switch to a shell inside vim and then switch out seamlessly.
On Windows I prefer gvim. On Linux it's vim inside gnome-terminal, which is nice and configurable thankyou.
To avoid (or at least minimize) the use of the mouse.
some gvim variations can't handle
some of my hotkeys
some spawn separate window when i try
to compile program
sometimes they simply can't use fonts
like fixed or terminus correctly
(think about "terminus bold" - some
gvim variations simply stretch
"terminus normal" instead of
rendering with the separate font)
cli generally works faster than gui,
especially if running in real
textmode console (not possible on a
mac though)
there are almost no benefits in using
GUI version, and i'd loose ability to
run in screen, ssh, to suspend
process with ctrl+z, and many more.
The main reason I use the command line is that I spend most of my day in a terminal already, and my use of vim reflects this. I do not open up vim for a long while just editing different files then opening others without closing it; I usually open a file or two do a few edits then do some command line tasks, maybe change a directory, and open up vim somewhere else. When using the a gui there is substantial lag when opening the editor. This wouldn't bother me if I opened it once and left it open but I tend to not work that way. So the command line works better for my workflow. Furthermore since there is no real benefit feature-wise of the GUI over the command line and vise-versa, I've always just stuck with the command line since it suited me better.
vim is way more performant with huge files (100-500MB .csv or .xml files in my case).
gvim beats vim hands-down when used to compare files (gvimdiff): setting the font (want more content on the screen?), dragging the window split line (want to see more of one file rather than the other) etc.
Other than that, I haven't seen other mayor differences and use gvim except when working with large files because I find it more handy in a graphical environment (gnome).
Speed of rendering
proper shell integration with
suspend (C-z),
alternate terminal,
uniform copy/paste
nicer quickfix integration (all external programs run inside your terminal, instead of popup windows... )
network agnostic: can run over ssh
using GNU screen, can detach/attach session over internet;
To the sometimes mentioned 'downside':
mouse support is up to par with :se mouse +=a; this enables selection, window border dragging with the mouse, even over GNU screen over ssh
Pair coding via vim + gnu screen is the selling point for me. I work in screen/vim all day, it allows people to remote into my screen session and we can both edit files fluidly. It's so hot right now.
As a big vim user myself, although I know about GUI vims, I don't use them just out of habit.
I've been using vi since 1990, switched to vim a few years ago but still call it through an alias (alias vi=vim).
For me its just habit. vim works well as it is. Perhaps the gui offers more and I should explore it, but vim works just the way I expect it to and want it to.

Text editors with vim mode?

I've come across ViEmu, and I read the very motivating article: Why, oh WHY, do those #?#! nutheads use vi?
Anyway, I've come to like the command mode in vim, specially the motions, and I also like the idea behind ViEmu, which is to bring "vim mode" into a typical text editor.
What other editors have a similar "vim mode" or a plugin that provides the functionality?
I am a huge fan of vim myself, so whenever I am trying a new IDE, I am instantly looking for a vim plugin. Here is a short list of plugins that I found:
Atom - vim-mode
Eclipse - Vrapper / Vimplugin / Eclim
Idea / WebStorm / pyCharm / RubyMine / CLion / PhpStorm / AppCode - IdeaVim
NetBeans - jVi
Notepad++ - ViSimulator
Visual Studio - ViEmu / vsvim
Xcode - Xvim
Also, a couple of editors/IDEs have built-in vim mode:
AbiWord word processor supports vi keybindings.
Kate text editor includes a vi mode.
QtCreator has FakeVim mode.
Sublime Text has vintage mode.
Even Emacs has viper-mode!
bash, gdb, mysql-client, and many other applications use the GNU Readline library to interact with the user. Readline includes a vi mode.
In Bourne-style shells like ksh and zsh, type set -o vi to enable vi-like command-line editing.
ViEmu works also in Microsoft Outlook, Microsoft SQL Server and Word!
Bonus - web browsers! Really, try it, it is awesome!
Firefox - vimperator
Chromium/Chrome - cvim / vimium
Sadly, all of vi plugins for Opera seem outdated.
Please let me know if I forgot something, I would be happy to extend the list. For a more extensive list (sometimes sadly outdated), please see this article.
It's worth noting that there's a lot more to vi than keybindings. As this blog post notes, there isn't any IDE plugin that emulates all the features vi.
Editra has vim mode
Check out excellent Vrapper plugin for Eclipse.
Vrapper is an eclipse plugin which acts as a wrapper for eclipse text editors to provide a Vim-like input scheme for moving around and editing text.
Unlike other plugins which embed Vim in Eclipse, Vrapper imitates the behaviour of Vim while still using whatever editor you have opened in the workbench. The goal is to have the comfort and ease which comes with the different modes, complex commands and count/operator/motion combinations which are the key features behind editing with Vim, while preserving the powerful features of the different Eclipse text editors, like code generation and refactoring.
Vrapper tries to offer Eclipse users the best of both worlds.
I primarily use:
Visual Studio with ViEmu
NetBeans with jVi
Sublime Text has a vintage mode for vi style editing.
for Firefox users :
setup It's all text! to use external vim - it will let you edit those textboxes in vim
Vimperator is also quite cool.
Emacs has viper-mode, which offers multiple levels of Vi emulation (from more Vi-like to more Emacs-like). The manual describes it as follows:
Viper Is a Package for Emacs Rebels;
it is a VI Plan for Emacs Rescue
and/or a venomous VI PERil.
It seems the eclim plugin can help you embed the real GVim into Eclipse.
http://texteditors.org/cgi-bin/wiki.pl?ViFamily includes a long list of vi clones and a long list of vi implementations. This second list includes perhaps a dozen text editors with "Vim modes".
Komodo Edit has a reasonably good Vi emulation mode. It's also very good for code sense etc.. and supports a plethora of languages. Linux and Windows... and damn, I should be on commission with these guys... wait a minute, it's freeware... Damn! Damn! Damn!
Anyway... Good editor, Linux & Windows, Free, Vi (and Emacs) emulation.
Qt Creator has a "vim mode" for editing, but it currently lacks some abilities; as well, I feel handicapped without the settings I have in my .vimrc.
I'm using viPlugin for Eclipse. Unfortunately, it's not free, but it works pretty well for all the basic Vim commands.
There is also freeware Vimplugin for Eclipse — it embeds Vim into Eclipse, but you lose all navigation and code-completion functionality that Eclipse provides, so its usefulness is disputable.
Slickedit has extremely good vim emulation. One of the soundest purchases I have ever made.
I have found the vim mode in Sublime Text 2 to be fantastic along with the great extensions and awesome performance makes it one of the best $59 I've spent all year.
Yzis a vi-like editor inspired by vim.
Yzis aims to be a powerful, fast
editor with all of Vim's features and
hopefully, at some point, more.
(quoted from Yzis' website)
EDIT : the yzis project seems to be dead. The internet archive has copy of the yzis page.

Text Editor For Linux (Besides Vi)? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Let me preface this question by saying I use TextMate on Mac OSX for my text needs and I am in love with it. Anything comparable on the Linux platform? I'll mostly use it for coding python/ruby.
Doing a google search yielded outdated answers.
Edit: Since there has been some concern about the 'merit' of this question. I am about to start a new Ruby Programming Project in Linux and before I got started I wanted to make sure I had the right tools to do the job.
Edit #2: I use VIM on a daily basis -- all . the . time. I enjoy using it. I was just looking for some alternatives.
http://xkcd.com/378/
Emacs is a wonderful text editor. It has huge power once you become a power user. You can access a shell, have as many files open as you want in as many sub-windows and an extremely powerful scripting support that lets you add all kinds of neat features.
I have been using a ruby-mode which adds syntax highlighting and whatnot to ruby, and the same exists for every major language.
If you keep at it, you can use exclusively the keyboard and never touch the mouse, which increases your editing speed by a significant margin.
If you want to start with something a lot more basic though, gedit is nice... it has built in syntax highlighting as well for most languages based on the filename extension. It comes with the OS as well (though emacs you can easily install with apt-get or some similar package finder utility).
UPDATE: I think gedit is exclusively GUI based though, so it would be useful to learn emacs in case you are stuck with just a shell (it is fully featured in both shell and graphical mode).
FURTHER UPDATE: Just FYI, I am not trying to push Emacs over Vim, it's just what I use, and it's a great editor (as I'm sure Vim is too). It is daunting at first (as I'm sure Vim is too), but the question was about text editors on Linux besides vi... Emacs seems the logical choice to me, but gedit is a great simple text editor with some nice features if that's all you are looking for.
Kate, the KDE Advanced Text Editor is quite good. It has syntax highlighting, block selection mode, terminal/console, sessions, window splitting both horizontal and vertical etc.
I use sublime Text on linux.
Try Scribes . It tries to be a TextMate replacement for Linux
2020 edit: forgotten in the mists of history
I use SciTE
very small and simple text editor.
I like the versatility of jEdit (http://www.jedit.org), its got a lot of plugins, crossplatform and has also stuff like block selection which I use all the time.
The downside is, because it is written in java, it is not the fastest one.
I find Geany (http://geany.uvena.de/) quite good.
I use pico or nano as my "casual" text editor in Linux/Solaris/etc. It's easy to come to grips with, and whilst you lose a couple of rows of text to the menu, at least it's easy to see how to exit, etc.
You can even extend nano, I think, and add syntax highlighting.
Alternative text editors? Try Diakonos, "a Linux editor for the masses". The default keyboard mapping is as expected for cut, copy, paste, undo, open, save, etc.
When I searched for TextMate alternative for Linux, I ended up using Geany. It's not as powerfull, but still nice to work with. Great replacement for Kate.
On Mac OS X, I have used BBEdit since the early 1990's, so I use that as my reference for all other editors. I sometimes use BBEdit to edit files on a Linux box using ftp mode, and that works very well if you have a fast network connection to the Linux box.
I learned emacs two years ago because the rest of the programming team I joined uses it. I find emacs powerful but annoyingly old-fashioned in many ways, but once you have learned emacs, you can use it on any platform (Linux, OS X, Windows). This is the editor I use almost exclusively at work now. It is going to take me years to master all its features, though.
I have also used gedit on Linux and found it very usable, but I haven't tried to use it as my primary editor for any project.
I have a colleague at work who uses Komodo Edit 4.4 (free from activestate.com), running it on a Windows computer but using it in ftp mode so she can edit files on our Linux server. Komodo Edit has many nice features, but it takes a looonnnggg time to launch the first time.
Don't forget NEdit! Small and light, but with syntax highlighting and macro record/replay.
Best one besides Vi? Vim.
SciTE
http://www.scintilla.org/SciTE.html
The best I've found is gedit unfortunately. Spend a few hours with it and you'll discover it's not so bad, with plugins and themes. You can use the command line to open documents in it.
+1 for pico/nano -- lightweight, gets the job done, good help
Friend of mine swears by jed, http://www.jedsoft.org/jed/
First I don't want to start a war..
I haven't used TextMate but I have used its Windows equivalent, e-TextEditor and I could understand why people love it.
I've also tried many text editors and IDEs in my quest in finding the perfect text editor on Linux. I've tried jEdit, vim, emacs (although I used to love when I was at uni) and various others.
On Linux I've settled with gEdit. Although I do use Komodo Edit from time to time. When I'm in a hurry I use gEdit purely because it is quicker than Komodo Edit.
gEdit has plenty of plugins and comes with some nice colour schemes. I reckon once gEdit has a proper code-tidy facility it'll be cool.
I think the only reason I use Komodo Edit is the project file facility.
I have a friend who donated his 'Vi Improved' book in the hope that he can convert me to Vim. The book is over an inch thick and completely put me off in investing time in learning Vim..
Everytime I find an editor - I always find myself going back to gEdit. It is a frills-in-the-right-places editor. Give gEdit a go, it is the default text editor in Ubuntu and Linux Mint.
Here is a link to an excellent guide on how to get gEdit to look and behave (somewhat) like TextMate:
http://grigio.org/pimp_my_gedit_was_textmate_linux
Hope that helps.
I agree with Mike, though I'm a Vim die-hard. I've been using GEdit quite frequently lately when I'm doing lightweight Ruby scripting. The standard editor (plus Ruby code snippets) is extremely usable and polished, and can provide a nice reprieve from full-strength, always-on programming editors.
I've just started using OSX. Free editors of note that I've discovered:
Komodo by ActiveState. No debugger or regex editor (although one comes with Python, i.e. redemo.py) in free version but perfectly usable.
ERIC, written in PyQT.
Eclipse with PyDev is my preferred option for editing Python on all platforms. Nice clean GUI, decent debugger. Good syntax parsing etc.
I've used Emacs for 20 years. It's great and it works everywhere. I also have TextMate, which I use for some things on the Mac (HTML mode is great). If you want to do Ruby development, Netbeans supports Ruby and it also runs on all platforms.
http://www.netbeans.org/features/ruby/index.html
I've seen some blogs, etc claiming that it's the best Ruby environment available.
I use joe for simple (and not so simple) editing when I'm away from Eclipse.
It uses the classic Wordstar keybindings- although I've never used Wordstar, it's a selling point for many people.
It's easy, well-supported, light-weight and it has binaries available for everything.
I love Kate because it has several interesting features (already cited) usually found in (heavier) IDEs. My favorite feature, however, is its terminal window that is very practical for quickly performing the save-compile-execute combo.
Nedit is another valid option, packed with lots of features (and it hasn't lots of dependencies: that's a huge plus IMHO).
For editing in a shell, when I cannot use VIM, I look immediately for pico or nano (but I would not recommend them for continuous development: for rapid editing they are perfect).
If it's just you? Use what you want to use today; switch in mid-stream if you want.
Is it a team? Try to be editor-agnostic. Set standards for white-space (are tabs allowed? How many spaces does a tab represent?), but otherwise allow anyone to use whichever editor they want.
Is it a team doing pair-programming? That's where you may need a team-standard editor, just so that programmers can easily pass the keyboard.
To help implement a standard white-space policy in a shop where one or more coders is using Emacs: You can tell Emacs about your white-space policy with some comments stuck at the bottom of every file source file. For example,
# Local Variables:
# tab-width: 2
# ruby-indent-level: 2
# indent-tabs-mode: nil
# End:
Anyone using emacs (or xemacs) on that file will automatically get the group standard indentation.
Sublime Text 2 is my favorite.
Intuitively understandable and quite powerful.
You can try Emacs with ruby-mode, Rinari (for Rails) and yasnippet which provides automatic snippets like Textmate.
TextMate is a great editor, and there is a way to replicate some of the functionality in GEdit. Check the article out here: http://rubymm.blogspot.com/2007/08/make-gedit-behave-roughly-like-textmate.html to modify GEdit to behave like TextMate.
Vim is a nice upgrade for Vi, offering decent features and a more usable set of keybindings and default behaviour. However, graphical versions like GVim, KVim and even Cream are extremely lacking in my opinion. I've been using Geany a lot lately, but it also has its shortcomings.
I just can't find something in the league of Programmers Notepad, Smultron or TextMate on Linux. A shame, since I want to live in an all open source cyberworld, I'm stuck hopping from one almost-right editor to another.
I personally use MacVim which is basically a GVim for Mac OSx. However I have been reading alot about Redcar, which is a text editor for Linux, which shares a lot of the Textmate functionality. Checkout the links below.
Redcar
LURG Lecture on Redcar

Resources