On Tue, Feb 22, 2011 at 10:20 AM, Bill Freeman <ke1...@gmail.com> wrote:
> You *could* use Tidy, then post process with a sed script to convert
> the '%20's to spaces.
>
> There may be comparable Windows tool, but if you want sed, you can
> install Cygwin.
>
> But if you install Cygwin, you could edit with vim.
>
> Since you're editing templates, you probably have python installed.
> If there isn't already a python based template reformatter, that
> sounds like an obvious project. It would still be outside your
> editor, however. I really want formatting aid inside my editor
> (spoiled emacs user). Perhaps an extension to IDLE?
>> --
>> You received this message because you are subscribed to the Google Groups "Django users" group.
>> To post to this group, send email to django...@googlegroups.com.
>> To unsubscribe from this group, send email to django-users...@googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>>
>>
>
There may be comparable Windows tool, but if you want sed, you can
install Cygwin.
But if you install Cygwin, you could edit with vim.
Since you're editing templates, you probably have python installed.
If there isn't already a python based template reformatter, that
sounds like an obvious project. It would still be outside your
editor, however. I really want formatting aid inside my editor
(spoiled emacs user). Perhaps an extension to IDLE?
On Tue, Feb 22, 2011 at 9:55 AM, mongoose <darren...@gmail.com> wrote:
It is possible to configure at least vim to never insert tab characters
and to convert them to the right number of spaces for 8 columns on
reading a .py file. But that's a separate issue.
On Tue, Feb 22, 2011 at 2:20 PM, Brice Leroy <bbrri...@gmail.com> wrote:
> Learning VI is good for you and it makes you fast. Learning curve is steep,
> I agree, but the result is quite amazing. One other big advantage, you can
> easily work on any server through SSH.
>
> 2011/2/22 mongoose <darren...@gmail.com>
>>
>> I used vim for a while but the learning curve really is steep. so
>> steep that i'm more effecient with the old style editors. perhaps i'll
>> just do what i do in notepad++ then format it in vim. i'll keep
>> looking around for a nice formatter though.
>>
>> On Feb 22, 5:20 pm, Bill Freeman <ke1g...@gmail.com> wrote:
>> > You *could* use Tidy, then post process with a sed script to convert
>> > the '%20's to spaces.
>> >
>> > There may be comparable Windows tool, but if you want sed, you can
>> > install Cygwin.
>> >
>> > But if you install Cygwin, you could edit with vim.
>> >
>> > Since you're editing templates, you probably have python installed.
>> > If there isn't already a python based template reformatter, that
>> > sounds like an obvious project. It would still be outside your
>> > editor, however. I really want formatting aid inside my editor
>> > (spoiled emacs user). Perhaps an extension to IDLE?
>> >
>> > On Tue, Feb 22, 2011 at 9:55 AM, mongoose <darrenma1...@gmail.com>
>> > wrote:
>> > > hi all,
>> >
>> > > I'm using notepad++ a lot and really missing a code formatter (vim
>> > > would be = to format).
>> > > Anyone know of anyway to format my html nicely? I've tried HTML Tidy
>> > > but it keeps adding a 20% where I have a space for example
>> > > "{{%20MEDIA_URL%20}}css/styles.css".
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Django users" group.
>> > > To post to this group, send email to django...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > django-users...@googlegroups.com.
>> > > For more options, visit this group
>> > > athttp://groups.google.com/group/django-users?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> blog: http://www.debrice.com
> project: http://alpha.kaaloo.com http://alpha.djangogenerator.com
> linkedin: http://www.linkedin.com/in/bricepleroy
python
at the Cygwin shell prompt?
And what does it say if you type:
which python
want to get vim working with omnicomplete then perhaps i'll get into
it more.
I've added this to my vimrc file
filetype plugin on
set ofu=syntaxcomplete#Complete
when i try
:python print 'hello'
i get this error
"Could not load library python26.dll
The python library could not be loaded."
first of all i have python 2.7 installed. second how can i specify
where vim needs to look to find the dll?
Sent from my BlackBerry wireless device from MTN
I used vim for a while but the learning curve really is steep. so
steep that i'm more effecient with the old style editors. perhaps i'll
just do what i do in notepad++ then format it in vim. i'll keep
looking around for a nice formatter though.
On Feb 22, 5:20 pm, Bill Freeman <ke1g...@gmail.com> wrote:
> You *could* use Tidy, then post process with a sed script to convert
> the '%20's to spaces.
>
> There may be comparable Windows tool, but if you want sed, you can
> install Cygwin.
>
> But if you install Cygwin, you could edit with vim.
>
> Since you're editing templates, you probably have python installed.
> If there isn't already a python based template reformatter, that
> sounds like an obvious project. It would still be outside your
> editor, however. I really want formatting aid inside my editor
> (spoiled emacs user). Perhaps an extension to IDLE?
>
> On Tue, Feb 22, 2011 at 9:55 AM, mongoose <darrenma1...@gmail.com> wrote:> > For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.
> > hi all,
>
> > I'm using notepad++ a lot and really missing a code formatter (vim
> > would be = to format).
> > Anyone know of anyway to format my html nicely? I've tried HTML Tidy
> > but it keeps adding a 20% where I have a space for example
> > "{{%20MEDIA_URL%20}}css/styles.css".
>
> > --
> > You received this message because you are subscribed to the Google Groups "Django users" group.
> > To post to this group, send email to django...@googlegroups.com.
> > To unsubscribe from this group, send email to django-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
I used vim for a while but the learning curve really is steep. so
steep that i'm more effecient with the old style editors. perhaps i'll
just do what i do in notepad++ then format it in vim. i'll keep
looking around for a nice formatter though.
> You *could* use Tidy, then post process with a sed script to convert
> the '%20's to spaces.
>
> There may be comparable Windows tool, but if you want sed, you can
> install Cygwin.
>
> But if you install Cygwin, you could edit with vim.
>
> Since you're editing templates, you probably have python installed.
> If there isn't already a python based template reformatter, that
> sounds like an obvious project. It would still be outside your
> editor, however. I really want formatting aid inside my editor
> (spoiled emacs user). Perhaps an extension to IDLE?
>
> On Tue, Feb 22, 2011 at 9:55 AM, mongoose <darrenma1...@gmail.com> wrote:> > For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.
> > hi all,
>
> > I'm using notepad++ a lot and really missing a code formatter (vim
> > would be = to format).
> > Anyone know of anyway to format my html nicely? I've tried HTML Tidy
> > but it keeps adding a 20% where I have a space for example
> > "{{%20MEDIA_URL%20}}css/styles.css".
>
> > --
> > You received this message because you are subscribed to the Google Groups "Django users" group.
> > To post to this group, send email to django...@googlegroups.com.
> > To unsubscribe from this group, send email to django-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
It takes about a month to get up to speed with vim, about a year to
become proficient and about three years to be fully comfortable. The
longer you use vim, the faster you get using it, and the more
productive you can be compared to users using mouse driven GUIs.
If you intend making a living out of knocking out 1's and 0's in a
specific order, it's wise to become fully acquainted with an editor
that is powerful and concise to use, and then never use anything but
that editor*.
From The Pragmatic Programmer [1]:
Use a Single Editor Well
The editor should be an extension of your hand; make sure your editor
is configurable, extensible, and programmable.
Cheers
Tom
[1] http://pragprog.com/the-pragmatic-programmer/extracts/tips
* It doesn't need to be vim, I also accept emacs.
All good points.
I would caution, however, that not every *nix production environment
has vim. (Less and less true, but I still see them.)
They will, however, have vi. (And the ones that have vim typically have
vi as an alias.) If you can use vi, you can get by in vim. But some of
the vim features you learn aren't there, you could be frustrated. So, if
you are just learning vi[m] to make quick edits on your production boxes,
and you're not using it for anything else because you already have a
different favorite editor, I'd advise you to limit your self to the vi command
set, until it becomes habit to, for example, reach for the 'j' key rather than
the down arrow when you want to go to the next line (if you were in insert
mode, you obviously need to get out of it before using 'j').
[And few productions systems have emacs, my favorite, installed. For the
dyed in the wool emacs user, look at the tramp extension, though I haven't
found it totally satisfying. If your production box does have emacs, consider
ssh's -Y flag, to get emacs to pop up a window on your desktop, rather than
running inside the terminal. This requires at least the X client libraries on
the production box, and, due to bad packaging, sometimes requires X
server libraries, even though there is no display, and thus no need (or
ability) to run an X server. There's also NX, but ssh -Y is so easy to set
up.]
Bill
Eurgh, vi. I'm a FreeBSD man, so all boxes come with nvi, which is a
little more featured than plain old vi, but still more than unusable.
I *can* use vi, just like I *can* write C, fortunately 99.99% of the
time, I don't have to. In these days of TB disks, and GB of RAM, using
vi over vim seems sadistic to me, and so it gets installed on all
boxes as part of our basic package set.
>
> [And few productions systems have emacs, my favorite, installed. For the
> dyed in the wool emacs user, look at the tramp extension, though I haven't
> found it totally satisfying.
Aargh, we're mortal enemies - I guess Eight Megs And Constantly
Swapping is no longer an insult I can use :)
This is where the pragmatic programmer rule comes in - tried emacs
once, didn't like it. Saw someone using vim like a wizard - code
magically appearing at a faster rate than any human can type, all
beautifully formatted and syntax highlighted - and was hooked.
From that point, 3 months of daily use till I wasn't repeatedly
referring to the cheat sheet, and felt completely comfortable about a
year after that.
Cheers
Tom
The last time I used a machine with fewer than 8Mb of RAM, emacs
was nowhere near that big. Besides, what are you running all those
other processes for? Emacs does it all.
> This is where the pragmatic programmer rule comes in - tried emacs
> once, didn't like it.
I've got to confess, it did take me a while to switch to emacs from teco.
(Of course, at the time emacs was implemented in teco.)
;^) - in case you couldn't tell.