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

Wish, Kate like file list.

Expand Messages
  • Edd Barrett
    Hi, This might already be possible, please excuse me if it is. I love the editting features of vim, but find that navigating between open files is quite
    Message 1 of 4 , Apr 12, 2007
    • 0 Attachment
      Hi,

      This might already be possible, please excuse me if it is.

      I love the editting features of vim, but find that navigating between
      open files is quite difficult.

      Ideally I think I would be quite confortable with a kate like
      interface for listing open files:
      http://www.kde.org/screenshots/images/3.1/fullsize/2.png (screenshot)

      I got quite close by messing about with netrw in a vertical split, but
      the list pane did not:

      - Remain the same size
      - Show only one file to be open in the right hand pane. It would
      always split again for each newly selected file.

      Does anyone know how to do this?

      Would anyone find this useful?

      I have looked into using vim-part inside kate, but this is not
      supported for my UNIX distribution.

      --
      Best Regards

      Edd
    • Ingo Karkat
      ... I haven t used Kate, but I m using a combination of - project (http://vim.sourceforge.net/scripts/script.php?script_id=69) to (re-)open files belonging to
      Message 2 of 4 , Apr 12, 2007
      • 0 Attachment
        Edd Barrett wrote:
        > Hi,
        >
        > This might already be possible, please excuse me if it is.
        >
        > I love the editting features of vim, but find that navigating between
        > open files is quite difficult.
        >
        > Ideally I think I would be quite confortable with a kate like
        > interface for listing open files:
        > http://www.kde.org/screenshots/images/3.1/fullsize/2.png (screenshot)
        >
        > I got quite close by messing about with netrw in a vertical split, but
        > the list pane did not:
        >
        > - Remain the same size
        > - Show only one file to be open in the right hand pane. It would
        > always split again for each newly selected file.
        >
        > Does anyone know how to do this?
        >
        > Would anyone find this useful?
        >
        > I have looked into using vim-part inside kate, but this is not
        > supported for my UNIX distribution.
        >

        I haven't used Kate, but I'm using a combination of
        - project (http://vim.sourceforge.net/scripts/script.php?script_id=69) to
        (re-)open files belonging to a custom file structure,
        - ProjectBrowse (http://vim.sourceforge.net/scripts/script.php?script_id=943) to
        open files in subdirectories and - most useful -
        - bufexplorer (http://vim.sourceforge.net/scripts/script.php?script_id=42) to
        navigate between files currently open in buffers.

        I've set up those plugins to open in a vertical split at the left side (like in
        most IDEs). Each view can be toggled on/off via a function key (F2, F3, F4). If
        one view is already open, trying to open another one will close the former, so
        that they don't eat up all of my window space.

        To achieve that, I've written mappings and VIM scripts like this (Attention!
        Incomplete code, just for illustration!):

        function s:IsProjectWindowEnabled()
        if exists("g:proj_running")
        if( bufwinnr( bufname( g:proj_running ) ) != -1 )
        return 1
        endif
        endif
        return 0
        endfunction

        function s:ToggleProjectWindow()
        " Project, TagList, JavaBrowser and BufExplorer vie for the same screen
        real estate; so
        " close other windows first.
        if( s:IsTagListEnabled() )
        call s:ToggleTagListWindow()
        endif
        if( s:IsJavaBrowserEnabled() )
        call s:ToggleJavaBrowserWindow()
        endif
        if( s:IsBufExplorerEnabled() )
        call s:ToggleBufExplorerWindow()
        endif

        " :Project has no toggle semantic itself, so we have to close the window
        " on our own.
        if( ! s:IsProjectWindowEnabled() )
        silent execute "Project"
        else
        silent execute "Project"
        silent execute "close"
        endif
        endfunction

        nmap <silent> <F2> :call <SID>ToggleProjectWindow()<CR>
        imap <silent> <F2> <C-O>:call <SID>ToggleProjectWindow()<CR>

        -- regards, ingo

        /^-- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ --
      • Ian Tegebo
        ... I was hoping the SideBar.vim plugin would do this for me: http://www.vim.org/scripts/script.php?script_id=720 Unfortunately it s broken for me in vim70
        Message 3 of 4 , Apr 12, 2007
        • 0 Attachment
          On 4/12/07, Ingo Karkat <swdev@...> wrote:
          > Edd Barrett wrote:
          > > Hi,
          > >
          > > This might already be possible, please excuse me if it is.
          > >
          > > I love the editting features of vim, but find that navigating between
          > > open files is quite difficult.
          > >
          > > Ideally I think I would be quite confortable with a kate like
          > > interface for listing open files:
          > > http://www.kde.org/screenshots/images/3.1/fullsize/2.png (screenshot)
          > >
          > > I got quite close by messing about with netrw in a vertical split, but
          > > the list pane did not:
          > >
          > > - Remain the same size
          > > - Show only one file to be open in the right hand pane. It would
          > > always split again for each newly selected file.
          > >
          > > Does anyone know how to do this?
          > >
          > > Would anyone find this useful?
          > >
          > > I have looked into using vim-part inside kate, but this is not
          > > supported for my UNIX distribution.
          > >
          >
          > I haven't used Kate, but I'm using a combination of
          > - project (http://vim.sourceforge.net/scripts/script.php?script_id=69) to
          > (re-)open files belonging to a custom file structure,
          > - ProjectBrowse (http://vim.sourceforge.net/scripts/script.php?script_id=943) to
          > open files in subdirectories and - most useful -
          > - bufexplorer (http://vim.sourceforge.net/scripts/script.php?script_id=42) to
          > navigate between files currently open in buffers.
          >
          > I've set up those plugins to open in a vertical split at the left side (like in
          > most IDEs). Each view can be toggled on/off via a function key (F2, F3, F4). If
          > one view is already open, trying to open another one will close the former, so
          > that they don't eat up all of my window space.
          I was hoping the SideBar.vim plugin would do this for me:

          http://www.vim.org/scripts/script.php?script_id=720

          Unfortunately it's broken for me in vim70 (shame on me for not
          contacting the maintainer or fixing it myself). At the moment it
          doesn't properly control the width of the sidebar.

          I was hoping to use only one function key that would cycle through my
          sidebars; maybe CTRL-FX would drop a sidebar or prompt to add another.
          Thanks for you code!

          --
          Ian Tegebo
        • Ian Tegebo
          ... You might want to look at winmanager: http://robotics.eecs.berkeley.edu/~srinath/vim/snapshot2.JPG http://www.vim.org/scripts/script.php?script_id=95 It
          Message 4 of 4 , Apr 12, 2007
          • 0 Attachment
            On 4/12/07, Edd Barrett <vext01@...> wrote:
            > Hi,
            >
            > This might already be possible, please excuse me if it is.
            >
            > I love the editting features of vim, but find that navigating between
            > open files is quite difficult.
            >
            > Ideally I think I would be quite confortable with a kate like
            > interface for listing open files:
            > http://www.kde.org/screenshots/images/3.1/fullsize/2.png (screenshot)
            You might want to look at winmanager:

            http://robotics.eecs.berkeley.edu/~srinath/vim/snapshot2.JPG
            http://www.vim.org/scripts/script.php?script_id=95

            It seems a very popular plugin for accomplishing this. If you search
            for 'tree' or 'file explorer' in the scripts section you'll see many
            more options.

            --
            Ian Tegebo
          Your message has been successfully submitted and would be delivered to recipients shortly.