Re: GVim File Dialog -- Remeber last opened directory?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bram Moolenaar wrote: > As far as I can guess from Googling a bit this is a bug in some version > of glib. It probably forgets to make a path absolute before calling > gnome_vfs_get_uri_from_local_path(). Or that function should expand the > name itself. > > You could try upgrading GTK/glib. > I am using the very latest version of glib2 (2.10.2) and gtk (2.8.17) and the error remains. Also, this sort of functionality (remembering the last visited path) works in other applications. Yi -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFER6DttXlIMrUVVksRAgGcAJ9EM0KqtEZwUvgT+B5cjxZqWjJvGACdF8NB b+sLy4FDyI+3Urx/hgmrBrc= =DiJu -END PGP SIGNATURE-
Re: GVim File Dialog -- Remeber last opened directory?
Benji Fisher wrote: > > > > > :set browsedir=last > > > > > > > > > > does not generate an error. When I try > > > > > > > > > > :browse e > > > > > > > > > > I get a similar error: > > > > > > > > > > (gvim:30150): libgnomevfs-CRITICAL **: file gnome-vfs-utils.c: line > > > > > 749 > > > > > (gnome_vfs_get_uri_from_local_path): assertion `local_full_path[0] == > > > > > '/'' failed > > > > That's indeed without gnome libraries. So why do you get an error from > > libgnomevfs (gnome-vfs-utils.c)? Vim isn't linked with it. > > > > Could this error actually be coming from the window manager somehow? > > I am out of my depth here. If you want me to test something, I can > try it, but I cannot diagnose it myself. > > Perhaps this matters. I started gvim from a gnome-terminal and > that is where the error message appeared. Probably not: I started an > xterm from the gnome-terminal, started gvim from the xterm, and then the > message appeared in the xterm. > > I did notice this time that the error message shows up the second > time that I do :browse e . I guess that is not surprising. As far as I can guess from Googling a bit this is a bug in some version of glib. It probably forgets to make a path absolute before calling gnome_vfs_get_uri_from_local_path(). Or that function should expand the name itself. You could try upgrading GTK/glib. -- I'm in shape. Round IS a shape. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///
Re: GVim File Dialog -- Remeber last opened directory?
On Wed, Apr 19, 2006 at 10:57:44PM +0200, Bram Moolenaar wrote: > > Benji Fisher wrote: > > > > > :set browsedir=last > > > > > > > > does not generate an error. When I try > > > > > > > > :browse e > > > > > > > > I get a similar error: > > > > > > > > (gvim:30150): libgnomevfs-CRITICAL **: file gnome-vfs-utils.c: line 749 > > > > (gnome_vfs_get_uri_from_local_path): assertion `local_full_path[0] == > > > > '/'' failed > > That's indeed without gnome libraries. So why do you get an error from > libgnomevfs (gnome-vfs-utils.c)? Vim isn't linked with it. > > Could this error actually be coming from the window manager somehow? I am out of my depth here. If you want me to test something, I can try it, but I cannot diagnose it myself. Perhaps this matters. I started gvim from a gnome-terminal and that is where the error message appeared. Probably not: I started an xterm from the gnome-terminal, started gvim from the xterm, and then the message appeared in the xterm. I did notice this time that the error message shows up the second time that I do :browse e . I guess that is not surprising. HTH --Benji Fisher
Re: GVim File Dialog -- Remeber last opened directory?
Benji Fisher wrote: > > > :set browsedir=last > > > > > > does not generate an error. When I try > > > > > > :browse e > > > > > > I get a similar error: > > > > > > (gvim:30150): libgnomevfs-CRITICAL **: file gnome-vfs-utils.c: line 749 > > > (gnome_vfs_get_uri_from_local_path): assertion `local_full_path[0] == > > > '/'' failed > > > > You must also be using Gnome. That's probably the problem, the gnome > > code isn't very smooth. > > > > Anyway, I don't get this error, thus it may depend on the version of the > > Gnome library. > > I am running Gnome, but I did not compile vim with Gnome support. > Also, the OP's error message seemed to come from GTK, not from Gnome. > So I think it is a problem with GTK and/or vim. > > Just to check myself: I think that +gnome is not the default, and > i compile vim OOTB on Linux (FC2 + GTK2 + Gnome). Here is my :version > output: > > VIM - Vi IMproved 7.0e BETA (2006 Apr 16, compiled Apr 16 2006 22:43:45) > Compiled by [EMAIL PROTECTED] > Normal version with GTK2 GUI. Features included (+) or not (-): That's indeed without gnome libraries. So why do you get an error from libgnomevfs (gnome-vfs-utils.c)? Vim isn't linked with it. Could this error actually be coming from the window manager somehow? -- If Microsoft would build a car... ... You'd have to press the "Start" button to turn the engine off. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///
Re: GVim File Dialog -- Remeber last opened directory?
On Wed, Apr 19, 2006 at 12:00:00PM +0200, Bram Moolenaar wrote: > > Benji Fisher wrote: > > > :set browsedir=last > > > > does not generate an error. When I try > > > > :browse e > > > > I get a similar error: > > > > (gvim:30150): libgnomevfs-CRITICAL **: file gnome-vfs-utils.c: line 749 > > (gnome_vfs_get_uri_from_local_path): assertion `local_full_path[0] == > > '/'' failed > > You must also be using Gnome. That's probably the problem, the gnome > code isn't very smooth. > > Anyway, I don't get this error, thus it may depend on the version of the > Gnome library. I am running Gnome, but I did not compile vim with Gnome support. Also, the OP's error message seemed to come from GTK, not from Gnome. So I think it is a problem with GTK and/or vim. Just to check myself: I think that +gnome is not the default, and i compile vim OOTB on Linux (FC2 + GTK2 + Gnome). Here is my :version output: VIM - Vi IMproved 7.0e BETA (2006 Apr 16, compiled Apr 16 2006 22:43:45) Compiled by [EMAIL PROTECTED] Normal version with GTK2 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_gui +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 -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_interact +xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/usr/local/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -fno-strength-reduce -Wall -I/usr/X11R6/include Linking: gcc -L/usr/X11R6/lib -L/usr/local/lib -o vim -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lXt -lncurses -lacl -lgpm HTH --Benji Fisher
Re: GVim File Dialog -- Remeber last opened directory?
Benji Fisher wrote: > On Tue, Apr 18, 2006 at 11:05:22AM -0700, Yi Qiang wrote: > > Bram Moolenaar wrote: > > >The 'browsedir' option should be of help. > > > > > On Linux with the latest vim7 build I get: > > > > (gvim:14701): Gtk-CRITICAL **: gtk_file_system_unix_get_folder: > > assertion `g_path_is_absolute (filename)' failed > > > > when I set browsedir=last > > > > Looks like that's why it is defaulting to $HOME maybe? > > > > Yi > > According to > > :help 'browsedir' > > this option only works with Win32 and Motif. Yet with my GTK2 build, > > :echo exists("+browsedir") > > returns 1 and > > :set browsedir=last > > does not generate an error. When I try > > :browse e > > I get a similar error: > > (gvim:30150): libgnomevfs-CRITICAL **: file gnome-vfs-utils.c: line 749 > (gnome_vfs_get_uri_from_local_path): assertion `local_full_path[0] == > '/'' failed > > Let me see: I am running FC2 with GTK2, and > > $ rpm -qa | grep -i gtk2 > > returns (among other things) > > gtk2-2.4.0-1 > > so I guess I am using GTK2 2.4.0. You must also be using Gnome. That's probably the problem, the gnome code isn't very smooth. Anyway, I don't get this error, thus it may depend on the version of the Gnome library. -- If you feel lonely, try schizophrenia. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///
Re: GVim File Dialog -- Remeber last opened directory?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Benji Fisher wrote: > On Tue, Apr 18, 2006 at 11:05:22AM -0700, Yi Qiang wrote: >> Bram Moolenaar wrote: >>> The 'browsedir' option should be of help. >>> >> On Linux with the latest vim7 build I get: >> >> (gvim:14701): Gtk-CRITICAL **: gtk_file_system_unix_get_folder: >> assertion `g_path_is_absolute (filename)' failed >> >> when I set browsedir=last >> >> Looks like that's why it is defaulting to $HOME maybe? >> >> Yi > > According to > > :help 'browsedir' > > this option only works with Win32 and Motif. Yet with my GTK2 build, > > :echo exists("+browsedir") > > returns 1 and > > :set browsedir=last > > does not generate an error. When I try > > :browse e > > I get a similar error: > > (gvim:30150): libgnomevfs-CRITICAL **: file gnome-vfs-utils.c: line 749 > (gnome_vfs_get_uri_from_local_path): assertion `local_full_path[0] == > '/'' failed > > Let me see: I am running FC2 with GTK2, and > > $ rpm -qa | grep -i gtk2 > > returns (among other things) > > gtk2-2.4.0-1 > > so I guess I am using GTK2 2.4.0. > > HTH --Benji Fisher I have a feeling that this is a gvim issue but I have never touched the vim code before, can someone point me to where to look for the gtk stuff? Yi -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFERdAstXlIMrUVVksRAqSqAJ4ijVVSvA0wrnq4xIDKEdXq3QPMIACfQazn PYhcVt66UnfXmWUhQSrbRSI= =hI7Z -END PGP SIGNATURE-
Re: GVim File Dialog -- Remeber last opened directory?
On Tue, Apr 18, 2006 at 11:05:22AM -0700, Yi Qiang wrote: > Bram Moolenaar wrote: > >The 'browsedir' option should be of help. > > > On Linux with the latest vim7 build I get: > > (gvim:14701): Gtk-CRITICAL **: gtk_file_system_unix_get_folder: > assertion `g_path_is_absolute (filename)' failed > > when I set browsedir=last > > Looks like that's why it is defaulting to $HOME maybe? > > Yi According to :help 'browsedir' this option only works with Win32 and Motif. Yet with my GTK2 build, :echo exists("+browsedir") returns 1 and :set browsedir=last does not generate an error. When I try :browse e I get a similar error: (gvim:30150): libgnomevfs-CRITICAL **: file gnome-vfs-utils.c: line 749 (gnome_vfs_get_uri_from_local_path): assertion `local_full_path[0] == '/'' failed Let me see: I am running FC2 with GTK2, and $ rpm -qa | grep -i gtk2 returns (among other things) gtk2-2.4.0-1 so I guess I am using GTK2 2.4.0. HTH --Benji Fisher
Re: GVim File Dialog -- Remeber last opened directory?
Bram Moolenaar wrote: I have never seen that error. Possibly a bug in GTK? What version of gtk2 are you using? I have gtk2 2.8.17 installed. If anyone else can reproduce it or let me know of a gtk2 version that it works with let me know. Yi
Re: GVim File Dialog -- Remeber last opened directory?
Yi Qiang wrote: > Bram Moolenaar wrote: > > The 'browsedir' option should be of help. > > > On Linux with the latest vim7 build I get: > > (gvim:14701): Gtk-CRITICAL **: gtk_file_system_unix_get_folder: > assertion `g_path_is_absolute (filename)' failed > > when I set browsedir=last > > Looks like that's why it is defaulting to $HOME maybe? I have never seen that error. Possibly a bug in GTK? -- hundred-and-one symptoms of being an internet addict: 150. You find yourself counting emoticons to get to sleep. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///
Re: GVim File Dialog -- Remeber last opened directory?
Bram Moolenaar wrote: The 'browsedir' option should be of help. On Linux with the latest vim7 build I get: (gvim:14701): Gtk-CRITICAL **: gtk_file_system_unix_get_folder: assertion `g_path_is_absolute (filename)' failed when I set browsedir=last Looks like that's why it is defaulting to $HOME maybe? Yi
Re: GVim File Dialog -- Remeber last opened directory?
Yi Qiang wrote: Using gvim, I find it very irritating that the Open File dialog always defaults to $HOME instead of the last browsed directory. Is there a way to change this behavior (it is not a limitation of the gtk file chooser) ? Does :help g:netrw_keepdir and :help netrw-c help you do what you want? Regards, Chip Campbell
Re: GVim File Dialog -- Remeber last opened directory?
Yi Qiang wrote: > Using gvim, I find it very irritating that the Open File dialog always > defaults to $HOME instead of the last browsed directory. Is there a way > to change this behavior (it is not a limitation of the gtk file chooser) ? The 'browsedir' option should be of help. -- Why is it called "Windows"? "Gates" would be more appropriate... /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://www.ICCF.nl ///
Re: GVim File Dialog -- Remeber last opened directory?
Hi Yi Qiang, On Tue, 18 Apr 2006 00:03:13 -0700 Yi Qiang <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > Using gvim, I find it very irritating that the Open File dialog always > defaults to $HOME instead of the last browsed directory. Is there a > way to change this behavior (it is not a limitation of the gtk file > chooser) ? > > Thanks in advance, > Yi > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.2.2 (GNU/Linux) > > iD8DBQFERI8xtXlIMrUVVksRAk5/AJ9Cf0g8rvt4sbrphWiUtQpEFgSiBQCeI9vK > BUW3WeX5cnpe4BG7vWoP48E= > =pZ2C > -END PGP SIGNATURE- Give :Explore or :Sexplore a go. You might be pleasantly surprised. -- Mark
Re: GVim File Dialog -- Remeber last opened directory?
On Tue, 18 Apr 2006 00:03:13 -0700 Yi Qiang <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > Using gvim, I find it very irritating that the Open File dialog always > defaults to $HOME instead of the last browsed directory. Is there a > way to change this behavior (it is not a limitation of the gtk file > chooser) ? > > Thanks in advance, > Yi > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.2.2 (GNU/Linux) > > iD8DBQFERI8xtXlIMrUVVksRAk5/AJ9Cf0g8rvt4sbrphWiUtQpEFgSiBQCeI9vK > BUW3WeX5cnpe4BG7vWoP48E= > =pZ2C > -END PGP SIGNATURE- just to expand on my previous reply try setting up mappings to your most visited folders. eg nnoremap uni :Sexplore /home/mark/Uni nnoremap vim :Sexplore /home/mark/.vim -- Mark
Re: GVim File Dialog -- Remeber last opened directory?
On 4/18/06, Yi Qiang <[EMAIL PROTECTED]> wrote: > Using gvim, I find it very irritating that the Open File dialog always > defaults to $HOME instead of the last browsed directory. Is there a way > to change this behavior (it is not a limitation of the gtk file chooser) ? In my linux/gtk gvim, file open dialog does remember last opened directory. But only within same gvim process. Or are you asking to remebmer lat browsed directory between gvim restarts ? Yakov
Re: GVim File Dialog -- Remeber last opened directory?
You probably need to give your system specs. The WinXP gvim does remember the last directory used. I don't know how to change the behavior of the default GUI open button, but you can create your own GUI buttons using Vim scripts. As a suggestion, you might consider using the : prompt to open new files. :e and :cd , combined with the ^D and autocomplete keys, are much faster. I don't know how others feel about the GUI buttons, but I consider them as an occasional convenience and as a way to transition into using Vim, and aren't intended for hardcore Vimming. If you really want to start cooking with gas, you'll rarely touch the mouse once inside Vim. P.s. It doesn't default to $HOME, as far as I can tell, but the directory you started gvim in. On 4/18/06, Yi Qiang <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > Using gvim, I find it very irritating that the Open File dialog always > defaults to $HOME instead of the last browsed directory. Is there a way > to change this behavior (it is not a limitation of the gtk file chooser) ? > > Thanks in advance, > Yi > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.2.2 (GNU/Linux) > > iD8DBQFERI8xtXlIMrUVVksRAk5/AJ9Cf0g8rvt4sbrphWiUtQpEFgSiBQCeI9vK > BUW3WeX5cnpe4BG7vWoP48E= > =pZ2C > -END PGP SIGNATURE- >