Re:VIM Destroys All Other Rails Editors
by xiaomai on Wednesday December 30, 2009 @11:12PM
(#1023788)
unless you prefer tabs, you can add:
set expandtab
to your .vimrc and then vim will magically insert spaces (according to your tabstop/shiftwidth) instead of real tabs.
:retab will turn all tabs into spaces for a file that already has tabs in it.
thanks! "Vim contains every features you could possibly imagine, and then some. Even when taking this law into account" - 10ren's Law
Re:VIM Destroys All Other Rails Editors
by barrkel on Wednesday December 30, 2009 @11:51PM
(#1023850)
I generally use something like:
expand -t "$tabWidth" "${files[@]}" | nl -b a | fold -s -w 108 | $PAGER
when I want to view files that use tabs; this is the final one-liner in a script I call 'view'. It gives me tabs expanded to width I specify (defaults 4), numbered lines, and long lines wrapped at word breaks but such that they don't break line numbering.
Re:VIM Destroys All Other Rails Editors
by blasdel on Thursday December 31, 2009 @12:54AM
(#1023914)
You needn't ever say "cat myfile | ..." period!
The shell has stdin redirection built in via '<'
Re:VIM Destroys All Other Rails Editors
by jrockway on Thursday December 31, 2009 @08:06AM
(#1024220)
Unless you want to read your pipeline from left to right, like everything else you read.
Re:VIM Destroys All Other Rails Editors
by blasdel on Thursday December 31, 2009 @12:39PM
(#1024591)
What if you want the subject on the right, like all non-pipeline commands you read?
foo myfile
bar < myfile
(bar | baz) < myfile
Re:VIM Destroys All Other Rails Editors
by throw_away on Thursday December 31, 2009 @06:19PM
(#1025175)
you can also say
$ < file executable
Re:VIM Destroys All Other Rails Editors
by TomasSedovic on Thursday December 31, 2009 @03:54AM
(#1024054)
What happened to TIMTOWTDI? :-)
Re:VIM Destroys All Other Rails Editors
by lallysingh on Thursday December 31, 2009 @06:18AM
(#1024139)
What's TIMTOW? And why would you want a turbo diesel, fuel injected version of it?
Re:VIM Destroys All Other Rails Editors
by steveklabnik on Thursday December 31, 2009 @09:03AM
(#1024276)
"There's More Than One Way To Do It" is a Perl philosophy.
But `cat` uglifies it, so I added this to ~/.bashrc:
You needn't say "cat myfile | tab"; you can just use it exactly like cat: "tab myfile" (I'm not saying that you'd not instantly realize that - but that I didn't).