do you use vim ?
If so, how do you open files you want to read/edit ?
Assuming you don't remember their exact name/location, you'd need to
use something like 'find . -iname '*pattern*'. which is slow.
You can also ":tabnew ." and just browse the folders, but that's super slow too.
so, do you use stuff like 'Source Insight' ?
It does have a great files viewer, where you can just type a few
letters, and it immediately shows only files that match the pattern
you typed (just like in iTunes). This is blazing fast. But it's Source
Insight. you need to fight it not to over-visualizes your file, and
not to mess up with your whitespace. not to mention that it's
windows-only (although wine seems to help here a bit).
so.. back to vim ? It does have relevant plugins that tries to give
you fast files opener, like the 'project' plugin (totally unmaintained
and buggy) or the 'tselectfiles' plugin (slow, hard to use).
I'd really like to use vim, it's fast and gives you control, but
really I must have some way to quickly access my files.
Any ideas ?
Ramagudi Naziir, le Tue 19 Jan 2010 14:52:57 +0200, a ?crit :
> Any ideas ?
I just use tags.
Samuel
On Tue, Jan 19, 2010 at 02:52:57PM +0200, Ramagudi Naziir wrote:
>do you use vim ?
>
...
>so, do you use stuff like 'Source Insight' ?
>
...
>
>Any ideas ?
Use cscope, if you need GUI, try kcscope.
--
Live like a child, think like the god.
On Tue, Jan 19, 2010 at 10:29:04PM +0800, Am?rico Wang wrote:
> >so, do you use stuff like 'Source Insight' ?
> >
> ...
> >
> >Any ideas ?
>
> Use cscope, if you need GUI, try kcscope.
For cscope-vim integration howto, see
http://cscope.sourceforge.net/cscope_vim_tutorial.html
This might be also interesting wrt kernel:
http://cscope.sourceforge.net/large_projects.html
Petr
--
Petr Uzel, openSUSE Boosters Team
2010/1/19 Ramagudi Naziir <[email protected]>:
> Assuming you don't remember their exact name/location, you'd need to
> use something like 'find . -iname '*pattern*'. which is slow.
You could use git to find the files quickly...
~/src/linux-2.6 (master)$ git ls-files *eeepc*
Documentation/ABI/testing/sysfs-platform-eeepc-laptop
drivers/platform/x86/eeepc-laptop.c
Ramagudi Naziir <[email protected]> writes:
> do you use vim ?
Sure, for small changes. And emacs.
> If so, how do you open files you want to read/edit ?
> Assuming you don't remember their exact name/location, you'd need to
> use something like 'find . -iname '*pattern*'. which is slow.
Not very slow, if the tree is already in cache. You need only ca. 1 GB
of RAM for this. I never use ".", I use "*" instead as it ignores .git
directory:
$ time find * -iname \*pattern\*
real 0m0.051s
$ time grep "The pattern" * -r
(results)
real 0m0.330s
(grep -i is much slower).
Other tools? Git, gitk and WWW browser :-)
--
Krzysztof Halasa
Ramagudi Naziir <[email protected]> writes:
> do you use vim ?
>
> If so, how do you open files you want to read/edit ?
> Assuming you don't remember their exact name/location, you'd need to
> use something like 'find . -iname '*pattern*'. which is slow.
GNU id-utils does that nicely (file name / symbol lookup)
I usually use it for symbol lookup.
I am not aware of a vim integration though, although
there's one for emacs.
-Andi
--
[email protected] -- Speaking for myself only.
On Tue, Jan 19, 2010 at 02:52:57PM +0200, Ramagudi Naziir wrote:
> do you use vim ?
>
> If so, how do you open files you want to read/edit ?
> Assuming you don't remember their exact name/location, you'd need to
> use something like 'find . -iname '*pattern*'. which is slow.
> You can also ":tabnew ." and just browse the folders, but that's super slow too.
Just use ctags to index your tree. Vim can then use this index to
directly drop you at the definition of a symbol. Works very well. Just
google around to find tutorials to describe that in detail.
LXR is also a nice help sometimes: http://lxr.linux.no/linux/
Other than that you might develop a feeling for where to search, so you
can narrow your 'git grep' to specific places.
HTH,
Daniel
On Fri, 2010-01-29 at 09:10 +0100, Daniel Mack wrote:
> On Tue, Jan 19, 2010 at 02:52:57PM +0200, Ramagudi Naziir wrote:
> > do you use vim ?
> >
> > If so, how do you open files you want to read/edit ?
> > Assuming you don't remember their exact name/location, you'd need to
> > use something like 'find . -iname '*pattern*'. which is slow.
> > You can also ":tabnew ." and just browse the folders, but that's super slow too.
>
> Just use ctags to index your tree. Vim can then use this index to
> directly drop you at the definition of a symbol. Works very well.
Yup. That's what I use.
> Just
> google around to find tutorials to describe that in detail.
$ man ctags
$ vim
:help tags
for those who don't wish to rely on the Goggle.
Regards,
Andy
> LXR is also a nice help sometimes: http://lxr.linux.no/linux/
>
> Other than that you might develop a feeling for where to search, so you
> can narrow your 'git grep' to specific places.
>
> HTH,
> Daniel