Loading ...
Sorry, an error occurred while loading the content.
 

Re: search C-code with */# in split window

Expand Messages
  • meino.cramer@gmx.de
    ... Hi Gary, thanks a lot ! :) Helps me a lot! Kind regards. mcc ... -- Please don t send me any Word- or Powerpoint-Attachments unless it s absolutely
    Message 1 of 5 , Jun 24 11:14 AM
      Gary Johnson <garyjohn@...> [09-06-24 20:09]:
      >
      > On 2009-06-24, meino.cramer@... wrote:
      > > Matt Wozniski <mjw@...> [09-06-24 18:29]:
      > > >
      > > > On Wed, Jun 24, 2009 at 12:02 PM, <meino.cramer@...> wrote:
      > > > >
      > > > >
      > > > > Hi,
      > > > >
      > > > > with */# I want to browse through C/C++ code, but the
      > > > > cursor should remain where I used */# the first time
      > > > > and the current window should be splitted and any
      > > > > other match should be found and shown there.
      > > > > For reasons I cannot explain fully (since I dont know them)
      > > > > I am not allowed to install anything else than vim
      > > > > and its scriptd. No ctags, no cscope (sigh).
      > > > > For this I am using vim under Windows. Normally
      > > > > I am using vim under Linux/Unix.
      > > > > I search the help and found nothing appropiate...
      > > > >
      > > > > Does anyone have any hint for me ?
      > > > >
      > > > > Kind regards and thank you very much in advance,
      > > > > mcc
      > > >
      > > > Just map those keys to split the window, then perform their usual action. Eg
      > > >
      > > > nnoremap * <C-w>s*
      > > > nnoremap # <C-w>s#
      > > >
      > > > or, if you'd prefer a new tab to a new split, you could use something like
      > > >
      > > > nnoremap * :tab split<CR>*
      > > > nnoremap # :tab split<CR>#
      > > >
      > > > ~Matt
      > > >
      > >
      > > Hi Matt,
      > >
      > > thank you for your reply ! :)
      > >
      > > ... this would split the window with each */# I will press after the
      > > first one, wouldn't it ?!? And produce a lot of tabs...
      > >
      > > After the window is split it should work as a normal */#
      > > until I will change the searched object...
      > >
      > > Any idea?
      >
      > Here's a start. This much will do what you want when executed from
      > the command line. I tried creating the appropriate mapping, but my
      > first attempt didn't work and I have to catch a train.
      >
      > :split | exe "normal /\\<\<C-R>\<C-W>\\>\<CR>"
      >
      > HTH,
      > Gary
      >
      >

      Hi Gary,

      thanks a lot ! :)

      Helps me a lot!

      Kind regards.
      mcc



      >
      >
      --
      Please don't send me any Word- or Powerpoint-Attachments
      unless it's absolutely neccessary. - Send simply Text.
      See http://www.gnu.org/philosophy/no-word-attachments.html
      In a world without fences and walls nobody needs gates and windows.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.