Hi Bram,

I made a patch which adds a new variable, 'v:progpath'. Quite similar to 
'v:progname', but including the full invocation path of the current vim 
instance. The full path itself is quite useful when you want to do tricks with 
vim servers and --remote-expr, and you don't have to care whether vim is in the 
$PATH.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff -r a42040fed96c runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Tue Jan 14 21:31:34 2014 +0100
+++ b/runtime/doc/eval.txt	Thu Mar 13 23:02:21 2014 +0200
@@ -1556,6 +1556,12 @@
 		|evim| etc., or any other name you might symlink to Vim.
 		Read-only.
 
+					*v:progpath* *progpath-variable*
+v:progpath	Contains the full path with which Vim was invoked.
+		Useful if you want to message a Vim server using a
+		|--remote-expr|.
+		Read-only.
+
 					*v:register* *register-variable*
 v:register	The name of the register in effect for the current normal mode
 		command (regardless of whether that command actually used a
diff -r a42040fed96c runtime/doc/tags
--- a/runtime/doc/tags	Tue Jan 14 21:31:34 2014 +0100
+++ b/runtime/doc/tags	Thu Mar 13 23:02:21 2014 +0200
@@ -5882,6 +5882,7 @@
 g:ada_with_gnat_project_files	ft_ada.txt	/*g:ada_with_gnat_project_files*
 g:ada_withuse_ordinary	ft_ada.txt	/*g:ada_withuse_ordinary*
 g:clojure_align_multiline_strings	indent.txt	/*g:clojure_align_multiline_strings*
+g:clojure_align_subforms	indent.txt	/*g:clojure_align_subforms*
 g:clojure_fuzzy_indent	indent.txt	/*g:clojure_fuzzy_indent*
 g:clojure_fuzzy_indent_blacklist	indent.txt	/*g:clojure_fuzzy_indent_blacklist*
 g:clojure_fuzzy_indent_patterns	indent.txt	/*g:clojure_fuzzy_indent_patterns*
@@ -7381,6 +7382,7 @@
 profiling	repeat.txt	/*profiling*
 profiling-variable	eval.txt	/*profiling-variable*
 progname-variable	eval.txt	/*progname-variable*
+progpath-variable	eval.txt	/*progpath-variable*
 progress.vim	syntax.txt	/*progress.vim*
 pronounce	intro.txt	/*pronounce*
 psql	ft_sql.txt	/*psql*
@@ -8386,6 +8388,7 @@
 v:prevcount	eval.txt	/*v:prevcount*
 v:profiling	eval.txt	/*v:profiling*
 v:progname	eval.txt	/*v:progname*
+v:progpath	eval.txt	/*v:progpath*
 v:register	eval.txt	/*v:register*
 v:scrollstart	eval.txt	/*v:scrollstart*
 v:searchforward	eval.txt	/*v:searchforward*
diff -r a42040fed96c src/eval.c
--- a/src/eval.c	Tue Jan 14 21:31:34 2014 +0100
+++ b/src/eval.c	Thu Mar 13 23:02:21 2014 +0200
@@ -361,6 +361,7 @@
     {VV_NAME("hlsearch",	 VAR_NUMBER), 0},
     {VV_NAME("oldfiles",	 VAR_LIST), 0},
     {VV_NAME("windowid",	 VAR_NUMBER), VV_RO},
+    {VV_NAME("progpath",	 VAR_STRING), VV_RO},
 };
 
 /* shorthand */
diff -r a42040fed96c src/main.c
--- a/src/main.c	Tue Jan 14 21:31:34 2014 +0100
+++ b/src/main.c	Thu Mar 13 23:02:21 2014 +0200
@@ -1611,6 +1611,7 @@
 
 #ifdef FEAT_EVAL
     set_vim_var_string(VV_PROGNAME, initstr, -1);
+    set_vim_var_string(VV_PROGPATH, (char_u *)parmp->argv[0], -1);
 #endif
 
     if (TOLOWER_ASC(initstr[0]) == 'r')
diff -r a42040fed96c src/po/pl.UTF-8.po
--- a/src/po/pl.UTF-8.po	Tue Jan 14 21:31:34 2014 +0100
+++ b/src/po/pl.UTF-8.po	Thu Mar 13 23:02:21 2014 +0200
@@ -14,7 +14,7 @@
 "Last-Translator: Mikolaj Machowski <[email protected]>\n"
 "Language: pl\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: Lokalize 1.0\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
diff -r a42040fed96c src/vim.h
--- a/src/vim.h	Tue Jan 14 21:31:34 2014 +0100
+++ b/src/vim.h	Thu Mar 13 23:02:21 2014 +0200
@@ -1876,7 +1876,8 @@
 #define VV_HLSEARCH	54
 #define VV_OLDFILES	55
 #define VV_WINDOWID	56
-#define VV_LEN		57	/* number of v: vars */
+#define VV_PROGPATH	57
+#define VV_LEN		58	/* number of v: vars */
 
 #ifdef FEAT_CLIPBOARD
 

Raspunde prin e-mail lui