|
|
| Author |
Message |
| 17 new of 32 responses total. |
tsty
|
|
response 16 of 32:
|
Dec 11 19:25 UTC 2010 |
This response has been erased.
|
cross
|
|
response 17 of 32:
|
Dec 11 22:06 UTC 2010 |
resp:13 I thought you were an emacs user?
resp:15 I agree completely: the right tool for the right job. Frankly,
I've always found it a little silly that people get into religious arguments
about things like text editors.
|
veek
|
|
response 18 of 32:
|
Dec 12 03:00 UTC 2010 |
resp:15 re, internal scripting language.. you mean.. in vi you can pipe
to commands OR do you mean attach scripts to internal editor commands??
Emacs uses eLisp right.. similarly.. can you use perl instead for
vim/gvim?? That would be awesome! but, modes! I like to be able to just
type :p
resp:17 yeah, me too, he mentioned that he didn't like modal editors.
|
kentn
|
|
response 19 of 32:
|
Dec 12 04:27 UTC 2010 |
Vim has its own scripting language called, as you might think, Vim
Script. It can be used to control the editor. It's actually a pretty
full programming language, including variables, loops, functions, and
if/else logic. It is also the language used in your .vimrc/.gvimrc
files.
vim script looks something like this:
:echo "*** Running SAS..."
let returntxt = system("/usr/local/sas -nodms " .
shellescape(expand("%:p")))
The last two lines should be all one line and come from a vim script
function I wrote for running SAS on the file being edited. Run vim
and do :help usr_41.
Also there are commands built in when you compile vim with support for
a given language, say perl. Thus, you can execute perl commands on the
buffer being edited (and btw, Vim/gVim have tabbed editing and multiple
buffer/file capability so you can switch buffers and stuff like that).
A couple commands are :pe[rl] {cmd} and :[range]perld[o] {cmd}. For
example, :perl VIM::Msg("hello world") will print the message (at the
bottom of the screen)--from the vim help. Or :perldo s/My stuff/Your
stuff/ (which goes through every line of the current buffer and does
the perl command (perldo) s///. Or :perldo $_ = reverse($_);1 (from
the vim help). There are something like 32 functions provided, such
as VIM::Msg(), to help run perl commands in vim. Run vim and do :help
if_perl and the scroll down to Using the Perl interface.
As in vi, in vim you can also call external commands like :r !date or
:!ls or external commands with movement !}sort.
So there are multiple ways to operate on a file being edited. And if
you don't want to learn anything much about vim script, you can use
perl (or python 2/3, ruby, mzscheme, or lua) or unix commands. And of
course, the usual vi and ex commands.
|
remmers
|
|
response 20 of 32:
|
Dec 12 17:46 UTC 2010 |
Re resp:17 - I was primarily an Emacs user but shifted preferences over
the last few years. Probably has something to do with retiring and no
longer being involved with large software projects so much. I've also
shifted from Linux with its X Window graphical interface to OS X. Emacs
is great in an X Window environment, not as much (or at least, not
clearly superior to Vim) with a terminal interface.
|
cross
|
|
response 21 of 32:
|
Dec 13 15:20 UTC 2010 |
Aquamacs wasn't to your liking?
|
remmers
|
|
response 22 of 32:
|
Dec 13 15:49 UTC 2010 |
Aquamacs is ok, but I don't actually do software development on the Mac.
|
cross
|
|
response 23 of 32:
|
Dec 13 16:33 UTC 2010 |
Huh. Why not, if I may ask? I find it's a comfortable environment for things
like that.
|
remmers
|
|
response 24 of 32:
|
Dec 13 18:39 UTC 2010 |
What programming I do these days (which isn't much compared to what I
did before retirement) I tend to do on FreeBSD and OpenBSD systems,
where my access is via a terminal connection.
|
nharmon
|
|
response 25 of 32:
|
Dec 18 15:38 UTC 2010 |
I am not a full-time programmer, and might work on 3 or 4 programming
projects per year. In between that time, I lose a lot of familiarity
with languages, and so for me an important feature of any programming
text editor is syntax checking, and text highlighting.
re 2: I've been checking out SciTE, and so far am liking it quite a bit.
|
remmers
|
|
response 26 of 32:
|
Dec 18 17:57 UTC 2010 |
Syntax-highlighting is useful to me as well. Both emacs and vim do a
reasonably good job of it.
|
kentn
|
|
response 27 of 32:
|
Dec 18 18:03 UTC 2010 |
What is nice is being able to "tweak" the syntax highlighting for a
language. Again, emacs and vim do a pretty job of that, too. Some
editors have syntax highlighting but it is very limited in what it can
do. Having the ability to add a new language for highlighting is also a
good feature. Not all editors support that.
|
bellstar
|
|
response 28 of 32:
|
Dec 19 20:52 UTC 2010 |
Re #25:
I dropped jEdit into the RHEL installation I have at work and am enjoying its
nice directory browser pane :-) Had to replace gcj with Sun's own for it to
run. Sadly, text rendering is painfully slow when I turn on font smoothing.
|
dtk
|
|
response 29 of 32:
|
Jan 1 02:34 UTC 2013 |
When I am working in a text-only environment, such as an SSH session, or
if I am doing a quick edit that does not justify starting a full
programming editor, I tend to revert back to VI. When I am working on
something larger, I usually revert to Komodo (Active State). It works
well, is the same in Windows or Linux, and is language-aware, without
being the bloated monster that is Jedit/Eclipse/Rational RSA. I also
like that it doesn't force you into the model of a project, if all you
are working on is a single code or a single module.
|
kentn
|
|
response 30 of 32:
|
Jan 1 15:58 UTC 2013 |
How much does Komodo cost now?
|
dtk
|
|
response 31 of 32:
|
Jan 6 22:25 UTC 2013 |
resp: 30 - The editor-only version (which is still pretty
fully-featured) is free. The IDE version, which integrates debugging,
source code management and a few other features is about 300$ as of Jan
2013. I have been happy with the free version. -DTK
|
kentn
|
|
response 32 of 32:
|
Jan 6 22:52 UTC 2013 |
Yeah, I'd prefer the IDE for Perl work, but $300 is quite a bit
for an IDE, although it does come with some other tools that
are useful, so that makes it more worth it if you have the need.
|