I’m new to vim. Someone please provide me their vimrc file which has all these features at least: Completion, Syntax highlight, Line number, Auto indentation and file browser.
Also, which plugins will be helpful working with Ruby?
I’m new to vim. Someone please provide me their vimrc file which has all
these features at least: Completion, Syntax highlight, Line number, Auto
indentation and file browser.
Also, which plugins will be helpful working with Ruby?
Coming over from AppleScript, one of the things I haven't been able to find is something like AppleScript's Text Item Delimiters or Awk's FS, where you can define separators for text files. For example, if I have something like this:
<td>1</td>
<td>2</td>
If I set FS to <td>, then I could capture 1</td>, and 2</td>.
While this isn't a great example because there are many other ways to capture this via regex. This becomes more useful with much more convoluted things. I haven't been able to find anything similar in Ruby, which probably means I need to rethink how I capture blocks of text and store them into arrays and hashes.
-----Original Message-----
From: Russell [mailto:rbakerjax@gmail.com]
Sent: Monday, October 31, 2011 12:42 PM
To: ruby-talk ML
Subject: Re: Vim Ruby Config
> Hello,
>
>
>
> I’m new to vim. Someone please provide me their vimrc file which has
> all these features at least: Completion, Syntax highlight, Line
> number, Auto indentation and file browser.
>
>
>
> Also, which plugins will be helpful working with Ruby?
>
>
>
> Godspeed –
>
> Junayeed Ahnaf Nirjhor
>
> Twitter - @Nirjhor <http://twitter.com/nirjhor>
>
>
>
>
Coming over from AppleScript, one of the things I haven't been able to find is something like AppleScript's Text Item Delimiters or Awk's FS, where you can define separators for text files. For example, if I have something like this:
<td>1</td>
<td>2</td>
If I set FS to <td>, then I could capture 1</td>, and 2</td>.
While this isn't a great example because there are many other ways to capture this via regex. This becomes more useful with much more convoluted things. I haven't been able to find anything similar in Ruby, which probably means I need to rethink how I capture blocks of text and store them into arrays and hashes.
Coming over from AppleScript, one of the things I haven't been able to find is something like AppleScript's Text Item Delimiters or Awk's FS, where you can define separators for text files. For example, if I have something like this:
<td>1</td>
<td>2</td>
If I set FS to<td>, then I could capture 1</td>, and 2</td>.
While this isn't a great example because there are many other ways to capture this via regex. This becomes more useful with much more convoluted things. I haven't been able to find anything similar in Ruby, which probably means I need to rethink how I capture blocks of text and store them into arrays and hashes.
Okay I installed vim ruby and supertab but it still is not completing
codes . It completes after I use a method but not before it.
A regular IDE offer code completion before you finish using it once.
It's not an IDE. If you're looking for something in that vein,
RubyMine<http://www.jetbrains.com/ruby/>is probably the best out
there. The reason that it doesn't auto-complete
until after you've defined it is because it doesn't load the entirety of
your Ruby + Gems into memory before starting up. If it did, it would
perform like an IDE, too.
> -----Original Message-----
> From: Russell [mailto:rbakerjax@gmail.com]
> Sent: Monday, October 31, 2011 12:42 PM
> To: ruby-talk ML
> Subject: Re: Vim Ruby Config
>
> You can start here. https://github.com/vim-ruby/vim-ruby
>
> On Mon, Oct 31, 2011 at 2:03 AM, Junayeed Ahnaf Nirjhor < > > zombiegenerator@aol.com> wrote:
>
> > Hello,
> >
> >
> >
> > I’m new to vim. Someone please provide me their vimrc file which has
> > all these features at least: Completion, Syntax highlight, Line
> > number, Auto indentation and file browser.
> >
> >
> >
> > Also, which plugins will be helpful working with Ruby?
> >
> >
> >
> > Godspeed –
> >
> > Junayeed Ahnaf Nirjhor
> >
> > Twitter - @Nirjhor <http://twitter.com/nirjhor>
> >
> >
> >
> >
Thanks everybody. It's just a matter of rethinking things, but the Justin you were spot on. The record separator was exactly what I was thinking about (or something similar actually).
I figured out why my parsing of data wasn't going so well. Maybe somebody can point me to better documentation on why this happens.
If I do this:
myarray = somestring.split('\n\n')
My array ends up with a single item
If I do this:
myarray = somestring.split("\n\n")
my array ends up with the breaks exactly where I expected them and I end up with multiple items in my array.
-----Original Message-----
From: Nick Klauer [mailto:klauer@gmail.com]
Sent: Monday, October 31, 2011 5:17 PM
To: ruby-talk ML
Subject: Re: Vim Ruby Config
> Okay I installed vim ruby and supertab but it still is not completing
> codes . It completes after I use a method but not before it.
>
> A regular IDE offer code completion before you finish using it once.
>
>
It's not an IDE. If you're looking for something in that vein,
RubyMine<http://www.jetbrains.com/ruby/>is probably the best out there.
The reason that it doesn't auto-complete until after you've defined it is
because it doesn't load the entirety of your Ruby + Gems into memory
before starting up. If it did, it would perform like an IDE, too.
-Nick Klauer
> > -----Original Message-----
> > From: Russell [mailto:rbakerjax@gmail.com]
> > Sent: Monday, October 31, 2011 12:42 PM
> > To: ruby-talk ML
> > Subject: Re: Vim Ruby Config
> >
> > You can start here. https://github.com/vim-ruby/vim-ruby
> >
> > On Mon, Oct 31, 2011 at 2:03 AM, Junayeed Ahnaf Nirjhor < > > > zombiegenerator@aol.com> wrote:
> >
> > > Hello,
> > >
> > >
> > >
> > > I’m new to vim. Someone please provide me their vimrc file which
> > > has all these features at least: Completion, Syntax highlight,
> > > Line number, Auto indentation and file browser.
> > >
> > >
> > >
> > > Also, which plugins will be helpful working with Ruby?
> > >
> > >
> > >
> > > Godspeed –
> > >
> > > Junayeed Ahnaf Nirjhor
> > >
> > > Twitter - @Nirjhor <http://twitter.com/nirjhor>
> > >
> > >
> > >
> > >
>
>
>
Thanks everybody. It's just a matter of rethinking things, but the Justin you were spot on. The record separator was exactly what I was thinking about (or something similar actually).
I figured out why my parsing of data wasn't going so well. Maybe somebody can point me to better documentation on why this happens.
If I do this:
myarray = somestring.split('\n\n')
My array ends up with a single item
If I do this:
myarray = somestring.split("\n\n")
my array ends up with the breaks exactly where I expected them and I end up with multiple items in my array.
Yes on both accounts (and I don't consider it rude that you asked/suggested). However, this is the first time I've run into this problem and I suspect that's because most of the books/tutorials/examples out there don't go into details on this particular subject. Coming from a language where you couldn't interchange single and double quotes in 99% of the situations, I was simply caught off-guard. Thanks for your explanation.
Wayne
···
On Oct 31, 2011, at 4:17 PM, Peter Hickman wrote:
Because that is how Ruby (and also Perl) work. Strings inside ' are
litteral and strings inside " are interpolated.
This might sound a little rude but have you read any books on Ruby or
worked through any of the tutorials?
There's probably more in there than you need. Feel free to pick and choose it's a tad messy, too. I started using pathogen half way through (kind
of like a package manager for vim).
Recommended parts: vim-ruby, syntastic (check the vimrc file for syntastic
setup), and rubycomplete.
As has been mentioned already, the autocomplete isn't built to work like an
IDE and will require exuberant ctags to run.