Avoid "auto" short paths
Hi , I'm using vim 8.1.1 in windows 8 at my work , corporate environment. Here we have the %HOMEPATH%, %HOMEDRIVE% set to "H:" and "\" What happen: I open a file at my Documents, path : C:\Users\cinacio\Documents\tmp1.txt Vim automatically short it to : ~\Documents\tmp1.txt I can see that with ":ls" and "let v:oldfiles" The problem is, I use mksession and since I have HOMEPATH, HOMEDRIVE set , when I reopen vim and try recover my session, they don't found the file because they replace "~" to %HOMEDRIVE%+%HOMEPATH% , not %USERPROFILE% looking for the file at H:\Documents\tmp1.txt So, I want set some option to force the use of absolute path "c:\Users\cinacio" and not "~". Is this possible? -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
hardcopy makes pdf files that open only on (some?) linux PDF readers
(set printoptions=header:0) :hardcopy > something.pdf :'o( I don't have a Windows OS here to give you the names, but I guess Adobe and Foxit were unable to read them, I don't remember. Google Drive uploads and displays them correctly, but fails to display or give a working route to display them in emails. Any (semi-)standard heading missing for them in the rendered PDF files? best, r. -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Is it a matter of Unix ABC, B-A-BA', basics, school stuff, RTFM ?
Em sábado, 30 de junho de 2018 19:43:34 UTC-3, Eric Christopherson escreveu: > On Sat, Jun 30, 2018 at 1:02 PM, Renato Fabbri wrote: > Em domingo, 24 de junho de 2018 05:05:17 UTC-3, Christian Brabandt escreveu: > > > On Sa, 23 Jun 2018, Renato Fabbri wrote: > > > > > > > https://www.facebook.com/groups/124928894848184/permalink/174455496562190/ > > > > > > Please do not make us all click here random faceboook pages. Rather > > > either keep the discussion here or there. You might as well post a > > > summary of that page. > > > > > > Best, > > > Christian > > > -- > > > Ein Glaube, der unruhig macht, ist Aberglaube. > > > -- Carl Ludwig Schleich > > > > I am really sorry. > > Maybe I sould have given a short description. > > It is the same content of this email, in another Vim users group. > > > > It would be helpful if you'd explain in plain English what your question is. > From the body of your message, it looks like you're just asking* if Vim is > the right tool for writing and reading; that's incredibly subjective and > open-ended. But your subject line doesn't make any sense to me. > > > * At least I'm assuming you're asking a question, since you end it with two > question marks; but your sentence doesn't include the word order inversion > usually used of questions in English, and has a period at the end, so it > looks like a statement. == I am very sorry for the nonstandard English. My question makes sense for some people, as some of the responses attest. Maybe this is a more general audience formulation: - is Vim the standard tool for editing (and reading and browsing as an extension, for the needs of a human text writer)? the answer is a neat 'it depends', IMHO (in my humble opinion). But consider it in the Linux tradition/school. I tend to think that Vim or Emacs would be the "correct" tools in this sense. But I have seen skillful programmers deal pretty well with text also using Sublime, Atom, and other more recent text editors. As the musical instrument imposes an idiom to the music (guitar music has arpeggios, percussive rhythms, etc), the tool a human writer uses (potentially) dictates the skills and produced artifacts (s)he reaches. That Vim is *a* standard tool, I think we all agree. Some here manifested a (potentially) positive opinion about Vim being *the* standard (for the human text writer). Which is somewhat interesting and expected. The motivation of this thread is to see how other participants of this list understand this issue. RTFM (read the fucking manual) is a free culture motto. As Vi(m) is available in (almost?) all GNU/Linux distributions (and thus standard manuals), maybe there are other serious reasons for understanding Vim as a matter of (redundant pleonasm standard) text-editing protocol. Maybe the GNOME school (of connecting people to spawn welfare through magick) is not so attached to Vim, or is based on it, etc... Who knows, and why not ask? What about other schools. Are there indications in the Slackware divinized documentation (manuals)? I am not the one to know all this (by heart) and the list might yield interesting insights. Is now this thread anywhere clearer? PS. we (humans?) have since always been updating the Guttenberg Galaxy: https://en.wikipedia.org/wiki/The_Gutenberg_Galaxy ? PS2. I don't mean to sound as trippy as this message, but the thread/issue does mingle philosophy; linux, hacker and free culture; cognition; in text editing, not only for programming. This is why I am writing for your assistance. Best regards, r. > > > > > > > -- > > -- > > You received this message from the "vim_use" 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_use" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+u...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > Eric Christopherson -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Avoid "auto" short paths
Cesar Martins wrote: > I'm using vim 8.1.1 in windows 8 at my work , corporate environment. > Here we have the %HOMEPATH%, %HOMEDRIVE% set to "H:" and "\" > > What happen: > > I open a file at my Documents, path : C:\Users\cinacio\Documents\tmp1.txt > Vim automatically short it to : ~\Documents\tmp1.txt > I can see that with ":ls" and "let v:oldfiles" > > The problem is, I use mksession and since I have HOMEPATH, HOMEDRIVE > set , when I reopen vim and try recover my session, they don't found > the file because they replace "~" to %HOMEDRIVE%+%HOMEPATH% , not > %USERPROFILE% looking for the file at H:\Documents\tmp1.txt > > So, I want set some option to force the use of absolute path > "c:\Users\cinacio" and not "~". > > Is this possible? Why is there a difference in home directory? Vim should get it right in both cases, when storing and when reading the session. Since you say that the session stores "~\Documents\tmp1.txt" that looks correct, so why is it different when you recover the session? -- An indication you must be a manager: You can explain to somebody the difference between "re-engineering", "down-sizing", "right-sizing", and "firing people's asses". /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: hardcopy makes pdf files that open only on (some?) linux PDF readers
Renato Fabbri wrote: > (set printoptions=header:0) > :hardcopy > something.pdf > > :'o( > > I don't have a Windows OS here to give you the names, > but I guess Adobe and Foxit were unable to read them, > I don't remember. > > Google Drive uploads and displays them correctly, > but fails to display or give a working route to display > them in emails. > > Any (semi-)standard heading missing for them in the rendered > PDF files? :hardcopy produces PostScript, not PDF. You need to pass it through a tool that can do the conversion, such as "ps2pdf". -- An indication you must be a manager: You believe you never have any problems in your life, just "issues" and "improvement opportunities". /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Avoid "auto" short paths
Hi Bram, This is the company environment, is very common users have they own disk areas at the network of the company, which usually is a drive mapping and set at HOMEDRIVE and HOMEPATH. When I open the file , at %USERPROFILE% which is my local drive , vim internally change the path references from c:\Users\cinacio (%USERPROFILE%) to "~" . But when vim expand "~" and exists HOMEDRIVE and HOMEPATH set, they use it. I know I can force my HOME setting %HOME%=%USERPROFILE% at windows environment. But I have others programs at my desktop and I don't know how this can affect them, so I would to avoid set the %HOME% That's why I would force vim works always with absolute path. Quote from the help : | $HOME | Using "~" is like using "$HOME", but it is only recognized at the start of an | option and after a space or comma. | | On Unix systems "~user" can be used too. It is replaced by the home directory | of user "user". Example: | :set path=~mool/include,/usr/include,. | | On Unix systems the form "${HOME}" can be used too. The name between {} can | contain non-id characters then. Note that if you want to use this for the | "gf" command, you need to add the '{' and '}' characters to 'isfname'. | | On MS-Windows, if $HOME is not defined as an environment variable, then | at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH. | | NOTE: expanding environment variables and "~/" is only done with the ":set" | command, not when assigning a value to an option with ":let". | | | Note the maximum length of an expanded option is limited. How much depends on | the system, mostly it is something like 256 or 1024 characters. | *$HOME-windows* | On MS-Windows, if $HOME is not defined as an environment variable, then | at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH. | If $HOMEDRIVE is not set then $USERPROFILE is used. | | This expanded value is not exported to the environment, this matters when | running an external command: > | :echo system('set | findstr ^HOME=') | and > | :echo luaeval('os.getenv("HOME")') | should echo nothing (an empty string) despite exists('$HOME') being true. | When setting $HOME to a non-empty string it will be exported to the | subprocesses. | | | Note the maximum length of an expanded option is limited. How much depends on | the system, mostly it is something like 256 or 1024 characters. Em qui, 9 de ago de 2018 às 15:45, Bram Moolenaar escreveu: > > Cesar Martins wrote: > > > I'm using vim 8.1.1 in windows 8 at my work , corporate environment. > > Here we have the %HOMEPATH%, %HOMEDRIVE% set to "H:" and "\" > > > > What happen: > > > > I open a file at my Documents, path : C:\Users\cinacio\Documents\tmp1.txt > > Vim automatically short it to : ~\Documents\tmp1.txt > > I can see that with ":ls" and "let v:oldfiles" > > > > The problem is, I use mksession and since I have HOMEPATH, HOMEDRIVE > > set , when I reopen vim and try recover my session, they don't found > > the file because they replace "~" to %HOMEDRIVE%+%HOMEPATH% , not > > %USERPROFILE% looking for the file at H:\Documents\tmp1.txt > > > > So, I want set some option to force the use of absolute path > > "c:\Users\cinacio" and not "~". > > > > Is this possible? > > Why is there a difference in home directory? Vim should get it right in > both cases, when storing and when reading the session. Since you say > that the session stores "~\Documents\tmp1.txt" that looks correct, so > why is it different when you recover the session? > > -- > An indication you must be a manager: > You can explain to somebody the difference between "re-engineering", > "down-sizing", "right-sizing", and "firing people's asses". > > /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net > \\\ > ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ > \\\ > \\\ an exciting new programming language -- http://www.Zimbu.org > /// > \\\help me help AIDS victims -- http://ICCF-Holland.org > /// > -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Avoid "auto" short paths
> This is the company environment, is very common users have they own disk > areas at the network of the company, which usually is a drive mapping and > set at HOMEDRIVE and HOMEPATH. So HOMEDRIVE and HOMEPATH are always set? Then these should be used, they are checked before USERPROFILE. > When I open the file , at %USERPROFILE% which is my local drive , vim > internally change the path references from c:\Users\cinacio (%USERPROFILE%) > to "~" . > But when vim expand "~" and exists HOMEDRIVE and HOMEPATH set, they use it. > > I know I can force my HOME setting %HOME%=3D%USERPROFILE% at windows > environment. > But I have others programs at my desktop and I don't know how this can > affect them, so I would to avoid set the %HOME% > > That's why I would force vim works always with absolute path. When HOMEDRIVE and HOMEPATH are set, then USERPROFILE should not be used. Are you saying that HOMEDRIVE and HOMEPATH are sometimes not set? That effectively means your home directory moves around, so it's expected that Vim doesn't handle that. Using an absolute path has the opposite effect: If your home directory is on a dynamically mounted drive, the drive letter can change while it's still the same directory. Then using "~/" is actually avoiding problems. Thus we can't use the full path as a default. I think having to set $HOME is acceptable. -- Arthur pulls Pin out. The MONK blesses the grenade as ... ARTHUR: (quietly) One, two, five ... GALAHAD: Three, sir! ARTHUR: Three. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Avoid "auto" short paths
Em qui, 9 de ago de 2018 às 17:09, Bram Moolenaar escreveu: > > > This is the company environment, is very common users have they own disk > > areas at the network of the company, which usually is a drive mapping and > > set at HOMEDRIVE and HOMEPATH. > > So HOMEDRIVE and HOMEPATH are always set? Then these should be used, > they are checked before USERPROFILE. > > Yes , they are always set. > > When I open the file , at %USERPROFILE% which is my local drive , vim > > internally change the path references from c:\Users\cinacio > (%USERPROFILE%) > > to "~" . > > But when vim expand "~" and exists HOMEDRIVE and HOMEPATH set, they use > it. > > > > I know I can force my HOME setting %HOME%=3D%USERPROFILE% at windows > > environment. > > But I have others programs at my desktop and I don't know how this can > > affect them, so I would to avoid set the %HOME% > > > > That's why I would force vim works always with absolute path. > > When HOMEDRIVE and HOMEPATH are set, then USERPROFILE should not be > used. Are you saying that HOMEDRIVE and HOMEPATH are sometimes not set? > That effectively means your home directory moves around, so it's > expected that Vim doesn't handle that. > > As mentioned before , the HOMEPATH and HOMEDRIVE is always set. My home directory don't move around. I'm not obligated for the company to save everything at the network home dir. So , I have a lot of documents and files at my regular documents (USERPROFILE/Documents) But vim get lost when I open a document on it. > Using an absolute path has the opposite effect: If your home directory > is on a dynamically mounted drive, the drive letter can change while > it's still the same directory. Then using "~/" is actually avoiding > problems. Thus we can't use the full path as a default. > > Is not this situation. > I think having to set $HOME is acceptable. > > I tried , but this mess configuration from few applications like cygwin and I use it a lot. > -- >Arthur pulls Pin out. The MONK blesses the grenade as ... > ARTHUR: (quietly) One, two, five ... > GALAHAD: Three, sir! > ARTHUR: Three. > "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES > LTD > > /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net > \\\ > ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ > \\\ > \\\ an exciting new programming language -- http://www.Zimbu.org > /// > \\\help me help AIDS victims -- http://ICCF-Holland.org > /// > -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Avoid "auto" short paths
On 2018-08-09, Cesar Martins wrote: > Em qui, 9 de ago de 2018 às 17:09, Bram Moolenaar escreveu: > > > > This is the company environment, is very common users have they own disk > > areas at the network of the company, which usually is a drive mapping > and > > set at HOMEDRIVE and HOMEPATH. > > So HOMEDRIVE and HOMEPATH are always set? Then these should be used, > they are checked before USERPROFILE. > > > Yes , they are always set. > > > > When I open the file , at %USERPROFILE% which is my local drive , vim > > internally change the path references from c:\Users\cinacio > (%USERPROFILE%) > > to "~" . > > But when vim expand "~" and exists HOMEDRIVE and HOMEPATH set, they use > it. > > > > I know I can force my HOME setting %HOME%=3D%USERPROFILE% at windows > > environment. > > But I have others programs at my desktop and I don't know how this can > > affect them, so I would to avoid set the %HOME% > > > > That's why I would force vim works always with absolute path. > > When HOMEDRIVE and HOMEPATH are set, then USERPROFILE should not be > used. Are you saying that HOMEDRIVE and HOMEPATH are sometimes not set? > That effectively means your home directory moves around, so it's > expected that Vim doesn't handle that. > > > As mentioned before , the HOMEPATH and HOMEDRIVE is always set. > My home directory don't move around. > I'm not obligated for the company to save everything at the network home dir. > So , I have a lot of documents and files at my regular documents (USERPROFILE/ > Documents) > But vim get lost when I open a document on it. > > > Using an absolute path has the opposite effect: If your home directory > is on a dynamically mounted drive, the drive letter can change while > it's still the same directory. Then using "~/" is actually avoiding > problems. Thus we can't use the full path as a default. > > > Is not this situation. > > > I think having to set $HOME is acceptable. > > > I tried , but this mess configuration from few applications like cygwin and I > use it a lot. I'm in the same kind of corporate Windows environment and I can replicate your results. When %HOMEDRIVE%, %HOMEPATH% and %USERPROFILE% are all defined in the environment, and %HOME% is not, I don't think I particularly care whether Vim synthesizes %HOME% from %HOMEDRIVE% and %HOMEPATH% or from %USERPROFILE%, but I do think it should be consistent. When Vim is started, it should look at %HOMEDRIVE%, %HOMEPATH%, %USERPROFILE% and %HOME%, and if %HOME% is not defined, set it according to some algorithm and leave it alone. It appears that Vim is instead creating %HOME% differently for different purposes. That's not good. For the record, the environment of my cmd.exe includes: HOMEDRIVE=G: HOMEPATH=\ USERPROFILE=C:\Users\gary but no HOME. From the Start menu, Windows runs cmd.exe in my %USERPROFILE% directory. I first run gvim like this: "C:\Program Files (x86)\vim\vim81\gvim.exe" -N -u NONE Documents\tmp3.txt Vim's title bar says: tmp3.txt (~\Documents) - GVIM I enter some text in the file, then :w :mksession :q Then I run gvim like this: "C:\Program Files (x86)\vim\vim81\gvim.exe" -N -u NONE -S Vim's title bar says: tmp3.txt (G:\Documents) - GVIM The status line says: "Documents\tmp3.txt" [New File] Regards, Gary -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Avoid "auto" short paths
Hi, 2018/8/10 Fri 5:09:25 UTC+9 Bram Moolenaar wrote: > > This is the company environment, is very common users have they own disk > > areas at the network of the company, which usually is a drive mapping and > > set at HOMEDRIVE and HOMEPATH. > > So HOMEDRIVE and HOMEPATH are always set? Then these should be used, > they are checked before USERPROFILE. > > > When I open the file , at %USERPROFILE% which is my local drive , vim > > internally change the path references from c:\Users\cinacio (%USERPROFILE%) > > to "~" . > > But when vim expand "~" and exists HOMEDRIVE and HOMEPATH set, they use it. > > > > I know I can force my HOME setting %HOME%=3D%USERPROFILE% at windows > > environment. > > But I have others programs at my desktop and I don't know how this can > > affect them, so I would to avoid set the %HOME% > > > > That's why I would force vim works always with absolute path. > > When HOMEDRIVE and HOMEPATH are set, then USERPROFILE should not be > used. Are you saying that HOMEDRIVE and HOMEPATH are sometimes not set? > That effectively means your home directory moves around, so it's > expected that Vim doesn't handle that. > > Using an absolute path has the opposite effect: If your home directory > is on a dynamically mounted drive, the drive letter can change while > it's still the same directory. Then using "~/" is actually avoiding > problems. Thus we can't use the full path as a default. > > I think having to set $HOME is acceptable. I found inconsistency in misc1.c. init_homedir() initialises the static variable homedir by checking the following environment variables: 1. HOME 2. HOMEDRIVE + HOMEPATH 3. USERPROFILE And vim_getenv("HOME") returns a value with the homedir variable. However home_replace() uses mch_getenv("HOME") and it doesn't uses vim_getenv("HOME") nor homedir. Maybe home_replace() should use homedir instead of mch_getenv("HOME")? Regards, Ken Takata -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.