Re: running vim on cygwin

2007-06-04 Thread Kamaraju Kusumanchi
Quoting Gary Johnson <[EMAIL PROTECTED]>:

> I think 'infocmp' is part of the default cygwin installation, so
> you 
> should have it.  Execute it in the same bash shell you used to run
> 
> vim and see what you get.  The first three lines should look like 
> this.
> 
> #   Reconstructed via infocmp from file:
> /usr/share/terminfo/c/cygwin
> cygwin|ansi emulation for Cygwin,
> am, hs, mir, msgr, xon,
> colors#8, it#8, pairs#64,
> 
> That will verify that your terminfo database is properly installed
> 
> and readable.  If you get something else, it may indicate what the
> 
> problem is.
> 


bash-3.2$infocmp
infocmp: couldn't open terminfo file .

So this could be a problem. But I dont know how to solve it.

The termcap 20050421-1, terminfo 5.5_20061104-1 are already installed on this 
system via cygwin. Is there anything else I could do?



> Something else you might do is execute
> 
>vim --version
> 

VIM - Vi IMproved 7.1 (2007 May 12, compiled May 14 2007 16:29:51)
Compiled by [EMAIL PROTECTED]
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent 
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic 
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path 
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
 +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu 
+mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm 
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme 
-netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile 
-python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent 
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static 
-tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar 
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace 
+wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp 
-xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
 user vimrc file: "$HOME/.vimrc"
  user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
Linking: 
gcc   -L/usr/local/lib -o vim.exe   -lncurses  -liconv -lintl



> and will show whether or nor your vim was linked with the ncurses
> library.
> 

I have also installed the libncurses-devel 5.5-3 packages. But that did not 
change anything...

--
Get a free email account with anti spam protection.
http://www.bluebottle.com



Re: running vim on cygwin

2007-06-04 Thread Kamaraju Kusumanchi
Quoting [EMAIL PROTECTED]:

> Kamaraju Kusumanchi <[EMAIL PROTECTED]> дÓÚ 2007-06-04
> 11:56:39:
> > Hi
> >
> > I installed vim 7.1 via cygwin on Windows XP machine.
> However,
> > when I run vim on the bash shell of cygwin, I am getting the
> following
> error.
> >
> > E558: Terminal entry not found in terminfo
> > 'cygwin' not known. Available builtin terminals are:
> 
> Generally, this will occur if you download vim source from vim
> "official"
> site and compile under cygwin by yourself.
> 



I have neither downloaded vim from the official website nor compiled it myself. 
I have installed vim only via cygwin's installer. I installed only the binary 
packages (and no source packages at all). 

Could this be a problem with the mirror site that I am downloading the cygwin 
packages from? My mirror is http://mirrors.xmission.com . Is there any other 
mirror which might work?

thanks
raju

--
Find out how you can get spam free email.
http://www.bluebottle.com



running vim on cygwin

2007-06-03 Thread Kamaraju Kusumanchi
Hi

I installed vim 7.1 via cygwin on Windows XP machine. However, when I run 
vim on the bash shell of cygwin, I am getting the following error.

E558: Terminal entry not found in terminfo
'cygwin' not known. Available builtin terminals are:
builtin_riscos
builtin_amiga
builtin_beos-ansi
builtin_ansi
builtin_pcansi
builtin_win32
builtin_vt320
builtin_vt52
builtin_xterm
builtin_iris-ansi
builtin_debug
builtin_dumb
defaulting to 'ansi'

Can anyone help me get rid of this error. This error stays on the screen for 
about 3 seconds. Then it disappears and the vim screen appears.

Any ideas?

thanks
raju

--
Free pop3 email with a spam filter.
http://www.bluebottle.com



Re: copy pasting HTML code into vim

2007-04-07 Thread Kamaraju Kusumanchi
Quoting Sartak <[EMAIL PROTECTED]>:

> 
> There's a Firefox extension named "Extended Copy Menu" which adds
> "Copy As Html" and "Copy As Plain Text" options to the right-click
> menu.
> 
> Shawn M Moore
> 

Thanks. Exactly what I was looking for.

raju


Re: Using vim to as a pager for manual pages.

2006-12-29 Thread Kamaraju Kusumanchi
On Friday 29 December 2006 07:05, J.A. de Vries wrote:

> I have this in my bashrc:
>
> # Use vim as a manpage reader
> function vman {
>   /usr/bin/man $* | /usr/bin/col -bp | /usr/bin/iconv -c | /usr/bin/view -c
> 'set ft=man nomod nolist' - }
>
> Someone suggested it years ago (don't remember who) and it works great
> for me.
>
> Grx HdV

Wow! What a beauty!

raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/

--
Top Online Master Degrees
Research online Master degrees from leading universities. Start today!
http://tags.bluebottle.com/fc/BgLEQfJAv0y9dUuZBPajL43gF1Yy6PMi4tyV/



Re: confused by % behavior

2006-12-27 Thread Kamaraju Kusumanchi
On Wednesday 27 December 2006 02:06, A.J.Mechelynck wrote:
>
> see ":help matchit-install"
>
> As an alternative to copying the files, you may want to add a pair of
> softlinks (untested):
>
>   ~/.vim/plugin/matchit.vim -> 
> /usr/local/share/vim/vim70/macros/matchit.vim
>   ~/.vim/doc/matchit.txt -> /usr/local/share/vim/vim70/macros/matchit.txt
>
>

This is not working for some reason. I have

$ls -l .vim/plugin/ .vim/doc
.vim/doc:
total 0
lrwxrwxrwx1 raju xxx45 Dec 27 19:06 matchit.txt -> 
myroot/usr/share/vim/vim70/macros/matchit.txt

.vim/plugin/:
total 0
lrwxrwxrwx1 raju xxx45 Dec 27 19:06 matchit.vim -> 
myroot/usr/share/vim/vim70/macros/matchit.vim

Even then matchit is not working. However if I add

  source ~/myroot/usr/share/vim/vim70/macros/matchit.vim

to .vimrc directly then it is working fine.


-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/

--
Click for military loan, fast & no lender fee, approval today
http://tags.bluebottle.com/fc/KCuXzzVQJzgEOO8UKHt8KQJehLU4Ni/



treat new line as space while searching

2006-12-27 Thread Kamaraju Kusumanchi
Let's say I have file with 2 lines, whose contents are

word1 word2
word3 word4

Now I want to treat new line character as a space character just for searching 
purposes. So that I can search for "word2 word3" and a match will be found.

Is this possible? Any extensions which do this?

thanks
raju
-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/

--
Click for free info on accredited degrees and make $150K/ year
http://tags.bluebottle.com/fc/KCuXzzTdjAXH5OgYoRgETfYrx1AAA6/



Re: confused by % behavior

2006-12-26 Thread Kamaraju Kusumanchi
On Wednesday 27 December 2006 02:06, A.J.Mechelynck wrote:
> Kamaraju Kusumanchi wrote:
> > Hi
> > I have two vim installations. One is on Debian Etch, vim 7.0-122. The
> > other one is Redhat 7.3, vim 7.0. On Debian I am using the distribution
> > provided vim packages. On Redhat, I compiled vim 7.0 myself. Both
> > machines have the same .vim, .vimrc, .gvimrc etc.,
> >
> > Now I have a .F90 file whose contents looks like
> >
> > function name(args)
> > ...
> > end function
> >
> > Let's say my cursor is on f of function.
> > On debian, If I enter %, it goes to "end function" line.
> > On Redhat, If I enter %, it goes to the end of that line. That is on
> > Redhat machine, it sees match between (, ) instead of match between
> > function, end function.
> >
> > My configuration files are temporarily hosted at
> > http://kamaraju.googlepages.com/vim_problems
> >
> > Please let me know how to get the correct behavior on the Redhat machine
> > as well...
> >
> > raju
>
> see ":help matchit-install"
>
> As an alternative to copying the files, you may want to add a pair of
> softlinks (untested):
>
>   ~/.vim/plugin/matchit.vim -> 
> /usr/local/share/vim/vim70/macros/matchit.vim
>   ~/.vim/doc/matchit.txt -> /usr/local/share/vim/vim70/macros/matchit.txt
>
>
> Best regards,
> Tony.

Thanks. But is there any way to do this without populating the ~/.vim 
directory? On Debian it works by default. Why does not it work like that on 
Redhat as well? 

BTW, on Redhat machine when I did
:so ~/myroot/share/vim/vim70/macros/matchit.vim then % works fine. I wonder 
how it is automatically sourced in Debian and why it was not on Redhat. On 
both machines VIMRUNTIME is same. i.e. on Debian,
:echo $VIMRUNTIME results in /usr/share/vim/vim70 and on Redhat it points to 
~/myroot/share/vim/vim70. So where is the difference coming from? Do I need 
to do something while compiling vim?

thanks
raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/

--
Click for military loan, fast & no lender fee, approval today
http://tags.bluebottle.com/fc/KCuXzzVQE7eN42p3qzqKSbDeHasRgh/



confused by % behavior

2006-12-26 Thread Kamaraju Kusumanchi
Hi
I have two vim installations. One is on Debian Etch, vim 7.0-122. The 
other one is Redhat 7.3, vim 7.0. On Debian I am using the distribution 
provided vim packages. On Redhat, I compiled vim 7.0 myself. Both machines 
have the same .vim, .vimrc, .gvimrc etc.,

Now I have a .F90 file whose contents looks like

function name(args)
...
end function

Let's say my cursor is on f of function.
On debian, If I enter %, it goes to "end function" line.
On Redhat, If I enter %, it goes to the end of that line. That is on Redhat 
machine, it sees match between (, ) instead of match between function, end 
function.

My configuration files are temporarily hosted at 
http://kamaraju.googlepages.com/vim_problems

Please let me know how to get the correct behavior on the Redhat machine as 
well...

raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/

--
Multiple Business Insurance Quotes
Compare multiple quotes for the best rates on business insurance.
http://tags.bluebottle.com/fc/BgLEQfI1E5KFp12PMaOwAxsPHu2uBsMLq4Vu/



Re: mksession does not remember window sizes

2006-10-24 Thread Kamaraju Kusumanchi
On Saturday 21 October 2006 01:14, A.J.Mechelynck wrote:
> Kamaraju Kusumanchi wrote:
> > Using Debian Etch and
> >
> > $vim --version
> > VIM - Vi IMproved 7.0 (2006 May 7, compiled Oct 10 2006 00:14:41)
> > Included patches: 1-122
> >
> > When I do mksession and load the session with gvim -S, the window sizes
> > in both the cases is not the same. Is there any way restore the window
> > size as well?
> >
> > I do not want to use something like
> > set lines=50 columns=80
> >
> > since different sessions could have different sizes etc.,
> >
> > Any other ideas?
> >
> > thanks
> > raju
>
> If you're using the same 'guifont' or the same console terminal, I don't
> see why you wouldn't be reusing the same 'lines' and 'columns' settings.
>
> Anyway, check your 'sessionoptions' and in particular the "winsize"
> suboption (which is part of the defaults and concerns the split-window
> sizes, unlike "resize" which concerns the global size of the Vim screen).
>
>

Thanks very much. :h sessionoptions helped a lot.

raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


mksession does not remember window sizes

2006-10-20 Thread Kamaraju Kusumanchi
Using Debian Etch and

$vim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Oct 10 2006 00:14:41)
Included patches: 1-122

When I do mksession and load the session with gvim -S, the window sizes in 
both the cases is not the same. Is there any way restore the window size as 
well?

I do not want to use something like
set lines=50 columns=80

since different sessions could have different sizes etc.,

Any other ideas?

thanks
raju


-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


Re: Can the mailing list owner set "Reply-to" field be [EMAIL PROTECTED]

2006-10-19 Thread Kamaraju Kusumanchi
On Thursday 19 October 2006 15:00, Paul Irofti wrote:
> Of course if you're
> stuck with Windows then I'd suggest Thunderbird

Thunderbird does not have a reply-to-list facility and is one of the long 
standing bugs (6 years and still going). More details at 
https://bugzilla.mozilla.org/show_bug.cgi?id=45715

raju


Re: Can the mailing list owner set "Reply-to" field be [EMAIL PROTECTED]

2006-10-18 Thread Kamaraju Kusumanchi
On Wednesday 18 October 2006 22:22, Peng Yu wrote:
> Hi,
>
> Can the mailing list owner set "Reply-to" field in every mail forward
> from this mailing list be "vim@vim.org"?
>
> I replied some mails to the original poster. But sometime I forget to
> reply the mails to the mailing list.
>

Use a decent email client like kmail, mutt etc., which are "mailing list 
aware". That way if you hit 'L', the reply will be sent to the list.  Of 
course, the letter 'L' can be configured to other  letters if it is a decent 
email client.

raju


split vertically at a tag

2006-10-17 Thread Kamaraju Kusumanchi
If I do

ctrl-W ctrl-]

in normal mode, vim splits the current window horizontally. Is there any way 
to achieve the same functionality but  with window being split vertically 
instead of horizontally?

thanks
raju


Re: syntax highlighting not working when loading a session

2006-10-11 Thread Kamaraju Kusumanchi
On Thursday 12 October 2006 00:43, Peter Hodge wrote:
> Ok, the problem is in your .vimrc:
>
> " this only works if the "filetype plugin indent on" command precedes
> the " "syntax on" command
> let s:extfname = expand("%:e")
> if s:extfname ==? "f90"
> let fortran_free_source=1
> unlet! fortran_fixed_source
> else
> let fortran_fixed_source=1
> unlet! fortran_free_source
> endif
>

I only followed whatever is given under

:help fortran

lines 1099 to 1106 of syntax.txt .


> If you don't start Vim with a .f90 file, then 'fortran_fixed_source' is set
> to '1' and all .f90 files will try to highlight as fixed source (looking
> for numbers).  You should put the block of code into your
> ftplugin/fortran.vim and make it to use the buffer-local variables instead:
>
>
>   ~/.vim/ftplugin/fortran.vim
>
> " Don't do other file type settings for this buffer
> let b:did_ftplugin = 1
>
> +   " use free source format for all .f90 files:
> +   let s:extfname = expand("%:e")
> +   if s:extfname ==? "f90"
> +   let b:fortran_fixed_source = 0
> +   else
> +   let b:fortran_fixed_source = 1
> +   endif
>

Thanks a lot. Your solution works perfectly. One small question. In my 
previous .vimrc, I had this varible called fortran_free_source. Do I need to 
worry about it in ~/.vim/ftplugin/fortran.vim or can I just forget about its 
existence completely?

thanks
raju


Re: syntax highlighting not working when loading a session

2006-10-11 Thread Kamaraju Kusumanchi
On Wednesday 11 October 2006 19:31, Peter Hodge wrote:

> At any rate, using ':setfiletype fortran' should fix the problem straight
> away.

No. This does not change the behavior. I cannot get the correct syntax 
highlighting even after doing this.

> The distributed ftplugin file for fortran sets a variable called
> 'b:fortran_fixed_source' to let the syntax file know how to highlight.  The
> 'bad highlighting' is because the ftplugin file isn't being executed (for
> some reason?) and so the syntax defaults to using wrong highlighting (it's
> looking for numbers at the start of each line). 

This could be the reason. I have changed the default .vim/ftplugin/fortran.vim 
quite a bit and might have messed it up somewhere.

> Curiously, my Vim doesn't 
> have a problem with opening a session and choosing the correct
> highlighting, so I wonder if something in your custom ftplugin or syntax
> files is preventing the distributed ftplugin file from detecting the
> fortran format correctly? Is there any chance you could paste the contents
> of your .vim/ftplugin/fortran.vim into an email?

I think this list does not allow any attachements (my messages were not 
delivered when I attached the files). So I posted 
my .vimrc, .gvimrc, .vim/ftplugin/fortran.vim, .vim/indent/fortran.vim at 
http://kamaraju.googlepages.com/vim_problems .

Please forgive me for not "tidying up" those configuration files. But I hope 
you guys wont have any trouble digging through them.

Thanks for all the replies so far.

raju

-- 
http://groups.google.com/group/ask-anything/about


Re: syntax highlighting not working when loading a session

2006-10-11 Thread Kamaraju Kusumanchi
On Wednesday 11 October 2006 18:12, Tim Chase wrote:
> >>> I get something like shown in working.png (
> >>> http://kamaraju.googlepages.com/vim_problems ). Now
> >>> inside the gvim session, I did
> >>>
> >>> :mksession! test.vim
> >>>
> >>> After this, exiting gvim and opening test.vim using
> >>>
> >>> gvim -S test.vim
> >>>
> >>> gave me something like shown in not_working.png
>
> Have you tried searching for something?  My first thought was
> that it looked like you had 'hls' set, had searched for something
> like
>
>   ^\_s*\S

I has hls set. But I did not search for any string like that.

Also while debugging this problem, I found another interesting thing. Dont 
know if this is useful or not, But still...

Say if I open any file other than a .f90 file

gvim test.txt

If inside this gvim session, I do

:sp helloworld.f90
or
:vs helloworld.f90

even then the syntax highlighting is not working properly. However if I just 
open helloworld.f90 directly then it works fine.

raju

>
> and then done ":noh" which wouldn't get saved in the session.
> When restoring the session (or with the right options in your
> viminfo), the last pattern should get restored, and if hls is
> enabled, it would search for that...
>
> Just another idea,
>
> -tim

-- 
http://groups.google.com/group/ask-anything/about


Re: syntax highlighting not working when loading a session

2006-10-11 Thread Kamaraju Kusumanchi
On Wednesday 11 October 2006 17:20, Yakov Lerner wrote:
> On 10/11/06, Kamaraju Kusumanchi <[EMAIL PROTECTED]> wrote:
> > When I save and load a session, the syntax highlighting is messed up.
> >
> > I am able to reproduce the problem as follows. Consider helloworld.f90
> >
> > $cat helloworld.f90
> > program helloworld
> > implicit none
> >
> > write(*,*) 'Hello World\n'
> > end program helloworld
> >
> > If I do
> >
> > $gvim helloworld.f90
> >
> > I get something like shown in working.png (
> > http://kamaraju.googlepages.com/vim_problems ). Now
> > inside the gvim session, I did
> >
> > :mksession! test.vim
> >
> > After this, exiting gvim and opening test.vim using
> >
> > gvim -S test.vim
> >
> > gave me something like shown in not_working.png
> >
> > Why is the syntax highlighting messed up in the second case? I have a
> > bunch of configuration files
> > namely .vimrc, .gvimrc, .vim/ftplugin/fortran.vim,
> > .vim/indent/fortran.vim which ensure that the syntax highlighting is
> > correct in the first case. But I do not know why these files are not
> > being loaded when I am restoring the session using -S. Any ideas?
>
> Does 'syn off | syn on' fixes the colors in this situation ?
>
> Yakov

No the behavior is still the same.

raju

-- 
http://groups.google.com/group/ask-anything/about


Re: syntax highlighting not working when loading a session

2006-10-11 Thread Kamaraju Kusumanchi
On Wednesday 11 October 2006 16:12, Kamaraju Kusumanchi wrote:
> When I save and load a session, the syntax highlighting is messed up.
>

Forgot to mention that I am using vim 7.0 available in Debian Etch.

raju


syntax highlighting not working when loading a session

2006-10-11 Thread Kamaraju Kusumanchi
When I save and load a session, the syntax highlighting is messed up.

I am able to reproduce the problem as follows. Consider helloworld.f90

$cat helloworld.f90
program helloworld
implicit none

write(*,*) 'Hello World\n'
end program helloworld

If I do

$gvim helloworld.f90

I get something like shown in working.png ( 
http://kamaraju.googlepages.com/vim_problems ). Now
inside the gvim session, I did

:mksession! test.vim

After this, exiting gvim and opening test.vim using

gvim -S test.vim

gave me something like shown in not_working.png

Why is the syntax highlighting messed up in the second case? I have a bunch of
configuration files
namely .vimrc, .gvimrc, .vim/ftplugin/fortran.vim, .vim/indent/fortran.vim
which ensure that the syntax highlighting is correct in the first case. But I
do not know why these files are not being loaded when I am restoring the
session using -S. Any ideas?

PS: This mailing list does not seem to accept any attachments. That is why I 
uploaded the screenshots to http://kamaraju.googlepages.com/vim_problems .

thanks
raju

-- 
http://groups.google.com/group/ask-anything/about


Re: combining two mapping into one

2006-10-06 Thread Kamaraju Kusumanchi
On Friday 06 October 2006 08:24, Andy Wokula wrote:
> Kamaraju Kusumanchi schrieb:
> > I use two mappings for my Fortran (.f90) files
> >
> > map  v%zf
> > map  zDv%zf
> >
> > The idea is to create folds for code blocks which are of the form
> >
> > subroutine some_name_here
> >statements_here
> > end subroutine some_name_here
> >
> > Here F5 folds the subroutine block irrespective of whether there are any
> > folds within it. F6 folds the subroutine block after deleting the
> > existing folds.
> >
> > However, if there are no folds and if I press F6, I get an error saying
> > that
> >
> > E490: No fold found
> >
> > Is it possible to combine these two maps into a single map such that
> > 1) If there are no existing folds, create a fold  (i.e. perform )
> > 2) If there are already some folds defined, then delete them and define a
> > new fold (i.e. perform )
> >
> > Any ideas?
> >
> > thanks
> > raju
>
> Some time ago I saw this:
> http://vim.sourceforge.net/tips/tip.php?tip_id=1330
>
> Andy

Thanks for the pointer. I tried 

nnoremap  @=((foldclosed(line('.')) < 
0) ? 'v%zfjj' : 'zDv%zfjj')

but it did not work due to . Dont know how to escape it properly. Any 
ideas? For now I am using

nnoremap  @=((foldclosed(line('.')) < 0) ? '1\|v%zfjj' : '1\|
zDv%zfjj')

but would like to use  instead of 1\| since that would make the map more 
readable.

thanks
raju

-- 
http://groups.google.com/group/ask-anything/about


combining two mapping into one

2006-10-06 Thread Kamaraju Kusumanchi
I use two mappings for my Fortran (.f90) files

map  v%zf
map  zDv%zf

The idea is to create folds for code blocks which are of the form

subroutine some_name_here
   statements_here
end subroutine some_name_here

Here F5 folds the subroutine block irrespective of whether there are any folds 
within it. F6 folds the subroutine block after deleting the existing folds.

However, if there are no folds and if I press F6, I get an error saying that

E490: No fold found

Is it possible to combine these two maps into a single map such that
1) If there are no existing folds, create a fold  (i.e. perform )
2) If there are already some folds defined, then delete them and define a new 
fold (i.e. perform )

Any ideas?

thanks
raju

-- 
http://groups.google.com/group/ask-anything/about


Re: change right arrow behaviour in normal mode

2006-10-02 Thread Kamaraju Kusumanchi
On Sunday 01 October 2006 12:31, Yakov Lerner wrote:
>
> See :help 'whichwrap'
>
> I have this in my .vimrc:
>:set whichwrap=<,>,[,]
>

Perfect! Exactly what I was searching for! Thanks.

raju


change right arrow behaviour in normal mode

2006-10-01 Thread Kamaraju Kusumanchi
Say I have a file with two lines

line abcd
line efgh

Normally when I press right arrow (or k), the cursor moves one character 
right! However if my cursor is at the end of line 1 (i.e. on 'd'). Then if I 
press right arrow (or k for that matter) vim just beeps. However I would like 
it to go the start of next line.

This behaviour would be somewhat similar to 'set backspace=2'. But here the 
relavant key is right arrow instead of backspace.

Any ideas?

thanks
raju


Re: Looking for the difference of two files, linewise

2006-08-25 Thread Kamaraju Kusumanchi
On Friday 25 August 2006 14:04, Mike wrote:
> On Fri, 25 Aug 2006, William O'Higgins Witteman might have said:
> > I have two files, one very long and the other much shorter.  Every line
> > in the short file is also in the long file.  What I need is a file with
> > every line in the long file *not* in the short file.  Is there an easy
> > way to have vim provide me with my desired complementary file?
> >
> > Thanks.
> > --
> >
> > yours,
> >
> > William
>
> $ man comm

Sorry for the nitpicking. But this sometimes might not work. For example

$cat temp1.txt
temp3
temp1

$cat temp2.txt
temp2
temp3
temp4
temp1
temp5

$comm -3 temp1.txt temp2.txt
temp2
temp1
temp4
temp1
temp5

$diff temp1.txt temp2.txt | grep '^>'  | cut -f 1 -d ' ' --complement
temp2
temp4
temp5

The OP did not mention that his files were sorted. So comm command might not 
be applicable for his case.

hth
raju

-- 
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about


Re: Looking for the difference of two files, linewise

2006-08-25 Thread Kamaraju Kusumanchi
On Friday 25 August 2006 14:01, William O'Higgins Witteman wrote:
> I have two files, one very long and the other much shorter.  Every line
> in the short file is also in the long file.  What I need is a file with
> every line in the long file *not* in the short file.  Is there an easy
> way to have vim provide me with my desired complementary file?
>
> Thanks.

If you are not particular about using vim and if you are using a Linux like 
OS, then you can do

$diff temp1.txt temp2.txt | grep '^>'  | cut -f 1 -d ' ' --complement

For example

$cat temp1.txt
This is temp1.txt
This is temp3.txt

$cat temp2.txt
This is temp1.txt
This is temp2.txt
This is temp3.txt
This is temp4.txt

$diff temp1.txt temp2.txt | grep '^>'  | cut -f 1 -d ' ' --complement
This is temp2.txt
This is temp4.txt

hth
raju

-- 
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about


Re: Viewing CVS diff with vim

2006-08-04 Thread Kamaraju Kusumanchi
On Friday 04 August 2006 09:59, Fabio Rotondo wrote:
> Hi all,
>
> is it possible to "pipe" the CVS diff -r output to vim to use something
> like "vimdiff" to see the changes?
>
> Thanks,
>
>   Fabio

I use subversion instead of CVS. I usually do

svn diff filename.F90 | gvim -

or

svn diff | gvim -

cvs should also work in a similar way. Does that answer your question?

raju

-- 
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about


Re: automatically recover from swap file

2006-07-04 Thread Kamaraju Kusumanchi
On Tuesday 04 July 2006 22:44, John Orr wrote:
> On Wednesday 05 July 2006 12:32, you wrote:
> > Let's say I have a .filename.swp as the swap file. Is it possible to
> > automatically recover and store the recovered file as filename.recovered?
> > I would like to do this non-interactively and for multiple files. Any
> > ideas?
>
> A great question I think - maybe vim has a way to handle these files
> simply, but I don't know of it.
>
> If it helps, below is the perl script I use to find .*.sw* files, open them
> with -r, save them with a "new_" prefix, compare the new to the original
> file they came from, and delete the new if they are the same. If not the
> same, open them both with gvimdiff (hence the "new_" prefix rather than
> extension - so syntax highlighting still works).
>

Your script is a life saver! Thank you very much for posting it.

raju

-- 
This email account uses challenge-response system.
Contact me only if you are comfortable with it.


automatically recover from swap file

2006-07-04 Thread Kamaraju Kusumanchi
Let's say I have a .filename.swp as the swap file. Is it possible to 
automatically recover and store the recovered file as filename.recovered? I 
would like to do this non-interactively and for multiple files. Any ideas?

thanks
raju

-- 
This email account uses challenge-response system.
Contact me only if you are comfortable with it.


[[ equivalent for fortran90

2006-07-03 Thread Kamaraju Kusumanchi
In C programming, I can do [[ inside a function to go to the begining of the 
function (actually to the begining { ). Is there any clever way to extend 
this to fortran 90 programming as well?

In fortran90 programs, the equivalent of C's functions are of the form

subroutine name
...
end subroutine name

function name
...
end function name

The main obstacle is that there are no {, } which start and end the functions 
as in C. In this case, how can I go from the middle of a function to the 
start of a function? Similarly, how can I go from the middle of a function to 
the end of the function, jump between functions etc.?

thanks
raju

-- 
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about


bufwinleave does not work across tabs

2006-06-18 Thread Kamaraju Kusumanchi
I have the following line in my ~/.vimrc

  au BufWinLeave *.f90 mkview

If I open file1.f90 then do

  :sp file2.f90

and close the file2.f90 then a new view is written. However if I do

  :tabe file2.f90

and close the file2.f90 then the above autocommand is not executed and no new 
view is written.

How can I change the autocommand such that it works with :sp, :vs, :tabe 
etc.,? Any ideas?

thanks
raju

-- 
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about


Re: some ideas.... Re: unable to unsubscribe

2006-06-07 Thread Kamaraju Kusumanchi
On Wednesday 07 June 2006 11:55, Robert Michel wrote:
> Salve Kamaraju!
>
> Do you know
> http://www.vim.org/maillist.php#help
> ?

Thanks for the link. I knew about it before. That is how I learned about 
[EMAIL PROTECTED] in the first place. However, I missed the following 
piece of information during the first read.

You can start a subscription for an alternate address,
for example "[EMAIL PROTECTED]", just add a hyphen and your
address (with '=' instead of '@') after the command word:
<[EMAIL PROTECTED]>

Now I unsubscribed kamaraju at gmail dot com using another address.


>
> #0#
> Do you use any mailfilter?

For list messages yes. But not for [EMAIL PROTECTED]

>
> #1#
> what happens when you first subscribe you again
> [EMAIL PROTECTED] (from kamaraju at...)

nothing happens. I do not receive any confirmation email.

> and then send a mail to
> [EMAIL PROTECTED] (from kmaraju at...)
>

when I send a message to that, nothing happens. I do not receive the 
confirmation email. I checked the spam folder as well.

> Just sending an email unsubscribe is not engough,
> you have to confirm this request.
>

But I was not getting the confirmation request.


> #2#
> try the same with
> " You can start a subscription for an alternate address,"

Yes. this worked and I got a confirmation message and successfully 
unsubscribed kamaraju at gmail dot com.


Thanks for all the help
raju

-- 
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about


unable to unsubscribe

2006-06-07 Thread Kamaraju Kusumanchi
I was previously subscribed to this list via kamaraju at gmail dot com. I 
would like to unsubscribe that address.

However when I send the email to [EMAIL PROTECTED] (from kamaraju at 
gmail dot com) nothing happens and I still keep getting emails from the vim 
list. 

If I send an email to vim@vim.org (from kamaraju at gmail dot com) the 
messages are bouncing. The kamaraju at gmail dot com account is working fine. 
What else could be the problem? Please help me unsubscribe.

thanks
raju

-- 
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about


Re: Vim-list improvement suggestions

2006-04-09 Thread Kamaraju Kusumanchi
>  It's
> not that much harder to use "Reply All" or "List Reply" (if your MUA
> supports it) when you want to reply to the list.
>

I am not the OP. I have a naive question in this regard. If I hit
"Reply All", then the To address will have sender's email and the CC
field will have vim@vim.org . Does that mean that the recipient will
receive the messages twice? Should I always take care to remove the To
address field and just keep the CC field or is it fine to leave the To
address as it is?

thanks
raju

--
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about