Re: Unintentionally closing Vim with many buffers open

2015-12-06 Thread wolfv
On Sunday, December 6, 2015 at 10:37:14 PM UTC-7, Ben Fritz wrote:
> On Saturday, December 5, 2015 at 1:18:02 PM UTC-6, wolfv wrote:
> > Sometimes I unintentionally close Vim with many buffers open.
> > Then I have to reopen Vim and reopen all the buffers I was working on.
> > Is there a way to prevent this, like a plugin that prompts "Multiple 
> > buffers are open, are you sure you want to close them?"
> > 
> > Thank you.
> 
> Why are you using :q if you want Vim to stay open? Maybe :bd instead would 
> suit your purposes better?

I didn't explain very well. This should clarify:

I usually work with one primary Vim open with multiple files in the buffers 
list.
Sometimes I will also temporarily open a few text files from the file manager, 
each file opened in its own Vim.
Then I quickly close all the temporary Vims by clicking the x in the top-right 
corner.
But sometimes I unintentionally close the primary Vim with the many files in 
the buffers list.
Then I have to reopen Vim and reopen all the files I was working on.
Is there a way to stop me from unintentionally closing Vim when the buffer list 
contains multiple files, like a configuration or plugin that prompts "Multiple 
files in buffers list, are you sure you want to close Vim?"

Some session managers give such a warning message.
But I don't want a session manager, I just the warning message.

I use ":source .fileList" to open groups of files that are frequently opened.
But that doesn't help when I close Vim with a one-off group of buffers.

-- 
-- 
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.


Unintentionally closing Vim with many buffers open

2015-12-05 Thread wolfv
Sometimes I unintentionally close Vim with many buffers open.
Then I have to reopen Vim and reopen all the buffers I was working on.
Is there a way to prevent this, like a plugin that prompts "Multiple buffers 
are open, are you sure you want to close them?"

Thank you.

-- 
-- 
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.


How to run a vim plugin function from vimrc?

2015-10-22 Thread wolfv
A plugin defines a function named HLMarks():

hi Marks term=reverse ctermfg=0 ctermbg=40 guibg=Grey40

function! HLMarks(group)
call clearmatches()
let index = char2nr('a')
while index < char2nr('z')
call matchadd( a:group, '\%'.line( "'".nr2char(index)).'l')
let index = index + 1
endwhile
endfunction

I want the HLMarks() function to run automatically every time vim opens a file.
The function works when I call it manually:

:call HLMarks("Marks")

I added these two lines to the end of my vimrc:

runtime plugin/markHL.vim
HLMarks("Marks")

which got this error:

E492: Not an editor command: HLMarks("Marks")

The first answer on 
http://vi.stackexchange.com/questions/2791/how-to-design-a-command-in-a-plugin-that-can-be-called-from-vimrc
 has a similar solution, but I couldn't get it to work.

How to automatically call the HLMarks("Marks") function when a file is opened?

The plugin's markHL.vim file is in my ~/.vim/plugin/ directory.

The ":function" command lists:

function HLMarks(group)

The plugin is described on http://www.vim.org/scripts/script.php?script_id=3394
and down loaded from http://www.vim.org/scripts/download_script.php?src_id=21611

-- 
-- 
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: How to run a vim plugin function from vimrc?

2015-10-22 Thread wolfv
On Thursday, October 22, 2015 at 12:21:33 AM UTC-6, wolfv wrote:
> A plugin defines a function named HLMarks():
> 
> hi Marks term=reverse ctermfg=0 ctermbg=40 guibg=Grey40
> 
> function! HLMarks(group)
> call clearmatches()
> let index = char2nr('a')
> while index < char2nr('z')
> call matchadd( a:group, '\%'.line( "'".nr2char(index)).'l')
>   let index = index + 1
> endwhile
> endfunction
> 
> I want the HLMarks() function to run automatically every time vim opens a 
> file.
> The function works when I call it manually:
> 
> :call HLMarks("Marks")
> 
> I added these two lines to the end of my vimrc:
> 
> runtime plugin/markHL.vim
> HLMarks("Marks")
> 
> which got this error:
> 
> E492: Not an editor command: HLMarks("Marks")
> 
> The first answer on 
> http://vi.stackexchange.com/questions/2791/how-to-design-a-command-in-a-plugin-that-can-be-called-from-vimrc
>  has a similar solution, but I couldn't get it to work.
> 
> How to automatically call the HLMarks("Marks") function when a file is opened?
> 
> The plugin's markHL.vim file is in my ~/.vim/plugin/ directory.
> 
> The ":function" command lists:
> 
> function HLMarks(group)
> 
> The plugin is described on 
> http://www.vim.org/scripts/script.php?script_id=3394
> and down loaded from 
> http://www.vim.org/scripts/download_script.php?src_id=21611

Thanks Tony and Gary.  Adding this line in vimrc worked:
autocmd BufReadPost * call HLMarks("Marks")

-- 
-- 
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: netrw 'qb' starts recoding macro

2015-08-18 Thread wolfv
On Sunday, August 16, 2015 at 9:12:18 PM UTC-6, wolfv wrote:
 From netrw normal mode, I type 'qb' to list bookmarks.
 Sometimes 'qb' will list bookmarks as intended.
 But usually the 'q' just starts recording a macro.
 Is there a setting to make 'q' always list bookmarks from netrw normal mode?
 
 'q' is too easy to activate recording accidentally.
 Is there a way to replace the 'q' with a colon command that starts recording?
 
 Thank you.

Thanks ZyX.
Adding this to my vimrc solved the problem:
setlocal timeoutlen=2000

-- 
-- 
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.


netrw 'qb' starts recoding macro

2015-08-16 Thread wolfv
From netrw normal mode, I type 'qb' to list bookmarks.
Sometimes 'qb' will list bookmarks as intended.
But usually the 'q' just starts recording a macro.
Is there a setting to make 'q' always list bookmarks from netrw normal mode?

'q' is too easy to activate recording accidentally.
Is there a way to replace the 'q' with a colon command that starts recording?

Thank you.

-- 
-- 
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: Where in the vim script is +-- N lines: added to folded markdown headings?

2015-08-15 Thread wolfv
On Saturday, August 15, 2015 at 12:42:27 AM UTC-6, Gary Johnson wrote:
 On 2015-08-14, wolfv wrote:
  I am using vim 7.4 with
  markdown heading folding from https://gist.github.com/vim-voom/1035030
  and highlighting from /usr/share/vim/vim74/syntax/markdown.vim
  
  With this setup, folded headings are preceded by +-- N lines: , where N 
  is the heading level.
  Unfolded headings are rendered as is.
  This causes folded and unfolded headings to misalign.
  In this example, heading3 is unfolded:
  
  +-- 37 lines: #heading1
  
  +-- 85 lines: #heading2
  
  #heading3
  
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
  tempor incididunt ut labore et dolore magna aliqua.
  
  +-- 16 lines: #heading4
  
  Where in the vim script are the +-- N lines:  added to the folded 
  markdown headings?
  I would like to change the vim script so that folded and unfolded headings 
  align on the left, something like this:
  
  #heading1 :37 lines 
  
  #heading2 :85 lines
  
  #heading3
  
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
  tempor incididunt ut labore et dolore magna aliqua.
  
  #heading4 :16 lines
 
 Those lines aren't added by the script; they are added by Vim itself
 and the foldtext() function, which is the default value of the
 'foldtext' option.  See
 
 :help foldtext()
 :help 'foldtext'
 :help fold-foldtext
 
 As described in those help topics, you can create your own
 'foldtext' expression or function to format the fold lines as you
 like.
 
 As an example, here is the 'foldtext' function from my ~/.vimrc that
 I use for almost all my folding.
 
 set foldtext=MyFoldText()
 function! MyFoldText()
 let n = v:foldend - v:foldstart + 1
 let i = indent(v:foldstart)
 let istr = repeat(' ', i)
 return istr . +- . v:folddashes .   . n .  lines 
 endfunction
 
 Regards,
 Gary

Thank you Gary for the great explanation.
My foldtext is working as desired:

setl foldtext=getline(v:foldstart).'\ \ \ :'.(v:foldend-v:foldstart)

-- 
-- 
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.


Highlight only markdown headings

2015-08-14 Thread wolfv
I want to highlight markdown headings, and omit the remaining Markdown syntax.

Maybe I could paste the vim script that highlights the markdown headings into 
my vimrc.
Where is the vim script that highlights the markdown headings?

Is there an easier way?

Thank you.

-- 
-- 
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.


Where in the vim script is +-- N lines: added to folded markdown headings?

2015-08-14 Thread wolfv
I am using vim 7.4 with
markdown heading folding from https://gist.github.com/vim-voom/1035030
and highlighting from /usr/share/vim/vim74/syntax/markdown.vim

With this setup, folded headings are preceded by +-- N lines: , where N is 
the heading level.
Unfolded headings are rendered as is.
This causes folded and unfolded headings to misalign.
In this example, heading3 is unfolded:

+-- 37 lines: #heading1

+-- 85 lines: #heading2

#heading3

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor 
incididunt ut labore et dolore magna aliqua.

+-- 16 lines: #heading4

Where in the vim script are the +-- N lines:  added to the folded markdown 
headings?
I would like to change the vim script so that folded and unfolded headings 
align on the left, something like this:

#heading1 :37 lines 

#heading2 :85 lines

#heading3

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor 
incididunt ut labore et dolore magna aliqua.

#heading4 :16 lines

-- 
-- 
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: Highlight only markdown headings

2015-08-14 Thread wolfv
On Friday, August 14, 2015 at 4:03:01 AM UTC-6, Sven Guckes wrote:
 * wolfv  [2015-08-14 11:56]:
  I want to highlight markdown headings,
  and omit the remaining Markdown syntax.
  Maybe I could paste the vim script that
  highlights the markdown headings into my vimrc.
  Where is the vim script that
  highlights the markdown headings?
 
  :view $VIM/syntax/markdown.vim
 
 copy what you need. ;)
 
  Is there an easier way?
 
 how easy do you need it? ;)
 
 wild guess:
   syn match MarkdownHeader  '^= .* =$'
   hiMarkdownHeader  ctermbg=green
 
 Sven
 
 -- 
 Chaos Communication Camp aka chaos camp
 http://events.ccc.de/camp/2015/wiki/Main_Page
 https://goo.gl/maps/kjbfU
 irc://irc.hackint.org/#camp

Thanks Sven.
That was easy.

-- 
-- 
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: Keep markdown headings open when switching buffers?

2015-08-13 Thread wolfv
On Thursday, August 13, 2015 at 3:41:36 AM UTC-6, wolfv wrote:
 On Wed, Aug 12, 2015 at 10:52 PM, Nikolay Pavlov wrote:
 
 
 2015-08-13 7:49 GMT+03:00 wolfv:
 
  I use markdown files with #headings, a vim plug-in folds and unfolds the 
  headings.
 
 
 
  When I initially open a markdown file in vim, all the headings are folded.
 
  I drill down through the headings to access a line.
 
 
 
  I switch to another buffer, read a line, and then switch back to the 
  previous buffer.
 
 
 
  All the markdown headings are refolded :(
 
  I have to drill down through the headings again to access the line I had 
  unfolded.
 
 
 
  Sometimes I need to reopen 2 or 3 headings.
 
  Is there a way to keep the markdown headings open when switching buffers?
 
  Or do you know of a markdown plugin with this desirable behavior?
 
 
 
 Vim should not automatically close fold unless instructed to by
 
 'foldclose' option. Plugin may also though alter Vim behaviour, but I
 
 think it is unlikely this is the case.
 
 
 
 Also check out 'foldopen' option.
 
 
 
 
 
  Thank you.
 
 
 
  --
 
  --
 
  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.
 
 
 
  For more options, visit https://groups.google.com/d/optout.
 
 
 --
 
 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
 
 
 
 ---
 
 
 
 Thanks Nikolay Pavlov,
 
 
 What you say agrees with the Vim manual:
 
 
 
 help: fold-behavior  For manual folding the defined folds are restored.
 
 
 help: fold-foldlevel  No manually opened folds will be closed.
 
 
 I am not using the 'foldclose' option, and 'foldopen' option is not what I 
 need.
 
 
 The only thing in my vimrc file is for folding:
 
 
 autocmd FileType markdown source /home/wolfv/vimfiles/ftplugin/markdown.vim
 
 
 Is markdown.vim part of the default vim install?
 
 
 markdown.vim and my small .vimrc file are attached.

The only purpose of my small .vimrc file is folding.
It sources the markdown.vim file, which was copied from 
https://gist.github.com/vim-voom/1035030

-- 
-- 
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.


remove all markdown highlighting except for the headings?

2015-08-13 Thread wolfv
Is there a way to remove all markdown highlighting except for the headings.
I do NOT want *bold* and _italics_ rendered.

My minimal vimrc file is attached.

-- 
-- 
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.


.vimrc
Description: Binary data


Re: Keep markdown headings open when switching buffers?

2015-08-13 Thread wolfv
On Thursday, August 13, 2015 at 3:05:58 PM UTC-6, wolfv wrote:
 On Thursday, August 13, 2015 at 3:41:36 AM UTC-6, wolfv wrote:
  On Wed, Aug 12, 2015 at 10:52 PM, Nikolay Pavlov wrote:
  
  
  2015-08-13 7:49 GMT+03:00 wolfv:
  
   I use markdown files with #headings, a vim plug-in folds and unfolds the 
   headings.
  
  
  
   When I initially open a markdown file in vim, all the headings are folded.
  
   I drill down through the headings to access a line.
  
  
  
   I switch to another buffer, read a line, and then switch back to the 
   previous buffer.
  
  
  
   All the markdown headings are refolded :(
  
   I have to drill down through the headings again to access the line I had 
   unfolded.
  
  
  
   Sometimes I need to reopen 2 or 3 headings.
  
   Is there a way to keep the markdown headings open when switching buffers?
  
   Or do you know of a markdown plugin with this desirable behavior?
  
  
  
  Vim should not automatically close fold unless instructed to by
  
  'foldclose' option. Plugin may also though alter Vim behaviour, but I
  
  think it is unlikely this is the case.
  
  
  
  Also check out 'foldopen' option.
  
  
  
  
  
   Thank you.
  
  
  
   --
  
   --
  
   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.
  
  
  
   For more options, visit https://groups.google.com/d/optout.
  
  
  --
  
  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
  
  
  
  ---
  
  
  
  Thanks Nikolay Pavlov,
  
  
  What you say agrees with the Vim manual:
  
  
  
  help: fold-behavior  For manual folding the defined folds are restored.
  
  
  help: fold-foldlevel  No manually opened folds will be closed.
  
  
  I am not using the 'foldclose' option, and 'foldopen' option is not what I 
  need.
  
  
  The only thing in my vimrc file is for folding:
  
  
  autocmd FileType markdown source /home/wolfv/vimfiles/ftplugin/markdown.vim
  
  
  Is markdown.vim part of the default vim install?
  
  
  markdown.vim and my small .vimrc file are attached.
 
 The only purpose of my small .vimrc file is folding.
 It sources the markdown.vim file, which was copied from 
 https://gist.github.com/vim-voom/1035030

The problem was solved by removing line 32 of 
https://gist.github.com/vim-voom/1035030

setl foldlevel=0

Now vim preserves folded state when switching buffers.

Thank you for your patients.

-- 
-- 
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.


Keep markdown headings open when switching buffers?

2015-08-12 Thread wolfv
I use markdown files with #headings, a vim plug-in folds and unfolds the 
headings.

When I initially open a markdown file in vim, all the headings are folded.
I drill down through the headings to access a line.

I switch to another buffer, read a line, and then switch back to the previous 
buffer.

All the markdown headings are refolded :(
I have to drill down through the headings again to access the line I had 
unfolded.

Sometimes I need to reopen 2 or 3 headings.
Is there a way to keep the markdown headings open when switching buffers?
Or do you know of a markdown plugin with this desirable behavior?

Thank you.

-- 
-- 
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.


Vim hangs and consums 24% of CPU

2015-07-01 Thread wolfv
 --classify  This option appends an indicator character to the end 
of each listed name.
/ = directory, * = executable, @ = symbolic link
 -h --human-readable Use this option in conjunction with the -l option to
display file sizes in human readable format rather than 
in bytes.
 -l Display results in long format.
 -r --reverse   Display the results in reverse order.
Normally, ls displays its results in ascending 
alphabetical order.
 -S Sort results by file size.
 -t Sort by modification time.

A Longer Look At Long Format16
$ ls -la
-rw-r--r--.  1 wolfv wolfv  4323 Jun 28 22:55 .vimrc
 where columns describe file's
 -rw-r--r--.access rights (Chapter 9 – Permissions)
 1  number of hard links
 wolfv  owner
 wolfv  group
 4323   size in bytes
 Jun 28 22:55   date last modified
 .vimrc name
 
Determining A File's Type With file 17
$ file picture.jpg
picture.jpg: JPEG image data, JFIF standard 1.01

Viewing File Contents With less 17
 many configuration files are text files
 less is a text-file viewer (better than more)
$ less filename
 Table 3-3: less Commands
 COMMANDACTION
 Page Upb   Scroll back one page
 Page Down  space   Scroll forward one page
 Up Arrow   k   Scroll up one line
 Down Arrow j   Scroll down one line
 G  Move to the end of the text file
 g  Move to the beginning of the text file
 /charactersSearch forward to the next occurrence of characters
 n  Search for the next occurrence of the previous search
 h  Display help screen
 q  Quit less

 If a command output is more than a screen full, you can navigate in less
$ ls | less
 less can be navigated like vi

http://www.thegeekstuff.com/2010/02/unix-less-command-10-tips-for-effective-navigation/
 Or you can scroll with gnome-terminal scroll buffer (not good with nav-layer 
key)
Shift+PgUp/PgDn/Home/End or scroll wheel

A Guided Tour   19
 Good to know where the files are when configuring or trouble shooting the OS
 As we go about our tour, try the following:
1. navigate into a given directory
$ cd
2. List the directory contents
$ ls -lF | less
3. If you see an interesting file, determine its contents
double click on a filename to copy
$ file [paste filename]
4. If it looks like it might be text, try viewing it
$ less [paste filename]
 DIRECTORY COMMENTS
 /  The root directory. Where everything begins.
 /bin   Contains binaries (programs) that must be present for the system to 
boot and run.
 /boot  Contains the Linux kernel, initial RAM disk image (for drivers needed 
at boot time),
and the boot loader.  Interesting files:
/boot/grub/grub.conf or menu.lst, which are used to configure 
the boot loader.
/boot/vmlinuz, the Linux kernel.
 /dev   This is a special directory which contains device nodes.
“Everything is a file” also applies to devices.
Here is where the kernel maintains a list of all the devices it 
understands.
 /etc   The /etc directory contains all of the system-wide configuration files. 
 It also contains
a collection of shell scripts which start each of the system services 
at boot time.
Everything in this directory should be readable text.  Most interesting 
files:
/etc/crontab, a file that defines when automated jobs will run.
/etc/fstab, a table of storage devices and their associated 
mount points.
/etc/passwd, a list of the user accounts.
 /home  In normal configurations, each user is given a directory in /home.
Ordinary users can only write files in their home directories.
This limitation protects the system from errant user activity.
 /lib   Contains shared library files used by the core system programs.
These are similar to DLLs in Windows.
 /lost+found Each formatted partition or device using a Linux file system, such 
as ext3,
will have this directory.
It is used in the case of a partial recovery from a file system 
corruption event.
Unless something really bad has happened to your system, this directory 
will remain empty.
 /media On modern Linux systems, the /media directory will contain the mount 
points for removable
media such as USB drives, CD-ROMs, etc. that are mounted automatically 
at insertion.
 /mnt   On older Linux systems, the /mnt directory contains mount points for 
removable devices

Re: vimdiff noob question

2014-06-12 Thread wolfv
On Thursday, June 12, 2014 8:43:13 AM UTC-6, Ben Fritz wrote:
 On Wed, Jun 11, 2014 at 11:04 PM, wolfv wrote:
 
  On Wednesday, June 11, 2014 10:02:12 PM UTC-6, wolfv wrote:
 
  On Wednesday, June 11, 2014 9:24:29 PM UTC-6, Ben Fritz wrote:
 
   On Wednesday, June 11, 2014 5:29:07 PM UTC-5, wolfv wrote:
 
 Can you use vimdiff, from C:\Users\wolf\Documents (rather than My 
 Documents)?
 
   
 
I am using Windows 7.
 
From Command Prompt:
 
C:\Users\wolf\Documentsvim -d a.txt b.txt
 
This pops up:
 
C:\PROGRA~2\Vim\vim74\vim.exe is not a valid Win32 application.
 
I click OK and Command Prompt says:
 
Access is denied.
 
  
 
   Yeah that's probably a different problem. You can try running vim.exe in 
   compatibility mode.
 
  
 
   Does gvim -d a.txt b.txt work from that directory? How about gvimdiff 
   a.txt b.txt?
 
 
 
  Yes, that works (screen shot attached).
 
  So it was the just the fake My Documents directory the whole time.
 
 
 
  I vaguely remember when I first got Windows 7, I renamed My Documents to 
  Documents, then later Windows automatically changed it back to My 
  Documents, and I left it that way.
 
 
 
  Thank you for sticking with me through so much trouble shooting. Your help 
  is is much appreciated.
 
 
 
  both  gvim -d a.txt b.txt and gvimdiff a.txt b.txt work from Documents:
 
  C:\Users\wolf\Documentsgvim -d a.txt b.txt
 
 
 
  C:\Users\wolf\Documentsgvimdiff a.txt b.txt
 
 
 
 
 
 Great!
 
 
 
 So, are you happy using just gvim? Or do you still want help getting
 
 vim.exe running? You may want to create a new thread for that if you
 
 do, I'm not sure how to go about fixing that one. I had a similar
 
 problem, which went away on its own when I gained admin rights:
 
 
 
 http://stackoverflow.com/q/23478373/1390430
 
 
 
 But looking at the error text now, it differs from the one you're
 
 getting, so perhaps it is a completely different issue.

Both Vim and gVim are now working in my Documents folder.
Below is how I removed fake My folder names, maybe it will help someone else.

How to remove fake My folder names
 My Documents folder name messes up vimdiff
 Windows 7 features fake folder names:
My Documents
My Music
My Pictures
My Videos
 The command Prompt displays their real names:
C:\Users\wolfdir
06/11/2014  10:02 PMDIR  Documents
05/15/2014  06:57 AMDIR  Music
06/09/2014  06:33 PMDIR  Pictures
05/15/2014  06:57 AMDIR  Videos
 The desktop.ini file in these folders is telling Windows Explore to display 
the fake names.
 To stop this nonsense, first set Folder Options to show .ini files:
Folder Options  View tab 
select: Show hidden files   
uncheck: Hide protected operatings system files
click Apply
 Then edit the desktop.ini files:
Go to the offending directory and open the desktop.ini file.
Comment the line that starts with LocalizedResourceName.
A semicolons (;) at the beginning of the line indicates a comment.
 The correct folder names will be displayed the next time you login. 

-- 
-- 
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: vimdiff noob question

2014-06-11 Thread wolfv
On Wednesday, June 11, 2014 10:48:15 AM UTC-6, Ben Fritz wrote:
 On Tuesday, June 10, 2014 4:49:26 PM UTC-5, wolfv wrote:
  
  I manually set a.txt and b.txt to contain unique lines of text.
 
 In what program? Vim? Notepad?
 
  Then from Command Prompt:
  gvim -O a.txt b.txt
  opens gvim showing both files as empty.
 
 This tells me that Vim is somehow not finding the files, or maybe can't get 
 access to the files.
 
  Looking at Windows Explorer preview pane confirms that both files are 
  indeed empty.
 
 ...and yet somehow Vim saves over them anyway.
 
  Then from inside gvim:
  :windo diffthis
  A window flashes (opens and closes very fast), but it's too fast for me to 
  see what it is.
  
 
 That would be the shell window, running diff.exe to get the output. But at 
 this point your files were already hosed, so we have ruled out diff as the 
 cause. Somehow Vim by itself is eating your data.
 
  I manually reset a.txt and b.txt to contain unique lines of text.
  Then from Command Prompt:
  gvim -o a.txt b.txt
  opens gvim showing both files as empty.
  But looking at Windows Explorer preview pane, I can see that a.txt is empty 
  and b.txt still contains the original text.
  Then from Command Prompt:
  vim -o a.txt b.txt
  an error message pops up:
  C:\PROGRA~2\Vim\vim74\vim.exe is not a valid Win32 application.
  [OK]
  I click the OK button and the Command Prompt line says:
  Access is denied.
  
 
 That looks like maybe some sort of 64-bit vs. 32-bit conflict. I'm not sure 
 what's going on there. I'd just use gvim if I were you unless you really 
 really like working in the cmd.exe shell.
 
  I think we are on to something.  What does it mean?
  Screen shot of Command Prompt is attached.
 
 I suggest dropping vimdiff for now and finding out why Vim is eating your 
 files.
 
 Start Vim this way, with text in both files:
 
 gvim -N -u NONE -U NONE -i NONE -O a.txt b.txt
 
 What happens? Does Vim open the files properly? If so, there is some problem 
 with your config. If not, I'm really not sure what could be going on. If Vim 
 still eats your files, I'd recommend a full uninstall and reinstall of Vim as 
 a first step.

Thank you Ben for your continued assistance.

gVim works fine when launched from my task bar.
That's how I manually set a.txt and b.txt to contain unique lines of text.
And I have been using gVim for other tasks as well.
From task bar gVim 7.4  Properties  Shortcut  Target: C:\Program Files 
(x86)\Vim\vim74\gvim.exe

gVim only deletes file content when I run it from Command Prompt.
From Command Prompt:
 C:\Users\wolf\My Documentswhere gvim
 C:\Windows\gvim.bat
 C:\Program Files (x86)\Vim\vim74\gvim.exe
What is gvim.bat supposed to be there?
In Windows Explorer:
 C:\Windows\gvim.bat
 C:\Windows\gvimdiff.bat

My Environment Variables is:
;C:\PROGRA~2\Vim\vim74\
In gVim, launched from task bar or from Command Prompt:
:echo fnamemodify('C:\Program Files (x86)', ':8')
C:\PROGRA~2

From Command Prompt:
 C:\Users\wolf\My Documentsgvim -N -u NONE -U NONE -i NONE -O a.txt 
b.txt
This message pops up:
 Location is not available
 C:\Users\wolf\My Documents is not accessible.
 Access is denied.
I click the OK button.
Then exit gVim:
 :q!
gVim closes.

The only reason I use vimdiff from the command prompt is because that is how 
the tutorial does it.
Otherwise I always launch gVim from the taskbar.
Is there a way to run vimdiff from the taskbar gVim?

I did a full uninstall and reinstall of Vim a few days ago.
I will do it again if you think it would help.

-- 
-- 
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: vimdiff noob question

2014-06-11 Thread wolfv
On Wednesday, June 11, 2014 3:12:55 PM UTC-6, Ben Fritz wrote:
 On Wednesday, June 11, 2014 2:33:57 PM UTC-5, wolfv wrote:
  From Command Prompt:
   C:\Users\wolf\My Documentsgvim -N -u NONE -U NONE -i NONE -O 
  a.txt b.txt
  This message pops up:
   Location is not available
   C:\Users\wolf\My Documents is not accessible.
   Access is denied.
  I click the OK button.
 
 I think this is the problem!
 
 You're using a Windows Vista or higher, right?
 
 If so, My Documents isn't a real location. The actual disk location is just
 Documents. Not all programs can use the fake My Documents. For example, even
 cmd.exe itself doesn't handle My Documents properly! Example:
 
 C:\Users\Bencd My Documents
 
 C:\Users\Ben\My Documentsdir
  Volume in drive C has no label.
  Volume Serial Number is C8FF-79BB
 
  Directory of C:\Users\Ben\My Documents
 
 File Not Found
 
 C:\Users\Ben\My Documentscd ..\Documents
 
 C:\Users\Ben\Documentsdir
  Volume in drive C has no label.
  Volume Serial Number is C8FF-79BB
 
  Directory of C:\Users\Ben\Documents
 
 02/03/2014  01:34 AMDIR  .
 02/03/2014  01:34 AMDIR  ..
 
 
 Can you use vimdiff, from C:\Users\wolf\Documents (rather than My Documents)?

I am using Windows 7.
From Command Prompt:
C:\Users\wolf\Documentsvim -d a.txt b.txt
This pops up:
C:\PROGRA~2\Vim\vim74\vim.exe is not a valid Win32 application.
I click OK and Command Prompt says:
Access is denied.

-- 
-- 
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: vimdiff noob question

2014-06-11 Thread wolfv
On Wednesday, June 11, 2014 2:01:21 PM UTC-6, Tim Chase wrote:
 On 2014-06-11 12:33, wolfv wrote:
 
  The only reason I use vimdiff from the command prompt is because
 
  that is how the tutorial does it. Otherwise I always launch gVim
 
  from the taskbar. Is there a way to run vimdiff from the taskbar
 
  gVim?
 
 
 
 If you highlight two files in your File Explorer and right-click on
 
 them, you should have an option to Diff with Vim which, at least on
 
 my old XP box at work, diffs them in gvim.
 
 
 
 -tim

Hi tim.
My Windows 7 doesn't have an option to Diff with Vim, it just has Edit with 
Vim.

-- 
-- 
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: vimdiff noob question

2014-06-11 Thread wolfv
On Wednesday, June 11, 2014 9:24:29 PM UTC-6, Ben Fritz wrote:
 On Wednesday, June 11, 2014 5:29:07 PM UTC-5, wolfv wrote:
   Can you use vimdiff, from C:\Users\wolf\Documents (rather than My 
   Documents)?
  
  I am using Windows 7.
  From Command Prompt:
  C:\Users\wolf\Documentsvim -d a.txt b.txt
  This pops up:
  C:\PROGRA~2\Vim\vim74\vim.exe is not a valid Win32 application.
  I click OK and Command Prompt says:
  Access is denied.
 
 Yeah that's probably a different problem. You can try running vim.exe in 
 compatibility mode.
 
 Does gvim -d a.txt b.txt work from that directory? How about gvimdiff 
 a.txt b.txt?

Yes, that works (screen shot attached).
So it was the just the fake My Documents directory the whole time.

I vaguely remember when I first got Windows 7, I renamed My Documents to 
Documents, then later Windows automatically changed it back to My 
Documents, and I left it that way.

Thank you for sticking with me through so much trouble shooting. Your help is 
is much appreciated.

-- 
-- 
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: vimdiff noob question

2014-06-11 Thread wolfv
On Wednesday, June 11, 2014 10:02:12 PM UTC-6, wolfv wrote:
 On Wednesday, June 11, 2014 9:24:29 PM UTC-6, Ben Fritz wrote:
  On Wednesday, June 11, 2014 5:29:07 PM UTC-5, wolfv wrote:
Can you use vimdiff, from C:\Users\wolf\Documents (rather than My 
Documents)?
   
   I am using Windows 7.
   From Command Prompt:
   C:\Users\wolf\Documentsvim -d a.txt b.txt
   This pops up:
   C:\PROGRA~2\Vim\vim74\vim.exe is not a valid Win32 application.
   I click OK and Command Prompt says:
   Access is denied.
  
  Yeah that's probably a different problem. You can try running vim.exe in 
  compatibility mode.
  
  Does gvim -d a.txt b.txt work from that directory? How about gvimdiff 
  a.txt b.txt?
 
 Yes, that works (screen shot attached).
 So it was the just the fake My Documents directory the whole time.
 
 I vaguely remember when I first got Windows 7, I renamed My Documents to 
 Documents, then later Windows automatically changed it back to My 
 Documents, and I left it that way.
 
 Thank you for sticking with me through so much trouble shooting. Your help is 
 is much appreciated.

both  gvim -d a.txt b.txt and gvimdiff a.txt b.txt work from Documents:
C:\Users\wolf\Documentsgvim -d a.txt b.txt

C:\Users\wolf\Documentsgvimdiff a.txt b.txt

-- 
-- 
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: vimdiff noob question

2014-06-10 Thread wolfv
On Tuesday, June 10, 2014 5:58:18 AM UTC-6, Ben Fritz wrote:
 On Monday, June 9, 2014 3:42:08 PM UTC-5, wolfv wrote:
  
  Here is a detailed play-by-play of me opening files in vim (screen shots 
  are attached):
 
 Thanks!
 
  
  I open files a.txt and b.txt in vim (non-diff mode).
 
 Ok, it looks like this was using gvim. E.g., from the command-line, gvim -o 
 a.txt b.txt gives me the same setup.
 
  Then I enter this in Command Prompt:
  vim -d a.txt b.txt
  Upon hitting enter, a warning pops up:
  W11: Warning: File a.txt has changed since editing started
  See :help W11 for more info.
  [OK]  [Load File]
  I click the Load File button, and file a.txt is empty in the vim non-diff 
  mode.
  Similar for file b.txt.
 
 Since you said you clicked a button it sounds like you got this message in 
 your gvim window, not your vim window.
 
 What *should* have happened, is that your new Vim instance started within 
 your terminal for diff mode, should have give you an error message about a 
 swap file existing already, asking if you want to delete the swap file, open 
 the file read-only, edit the file anyway, etc.
 
 Since this did not happen, I wonder, what is running when you run vim from 
 the command-line. On recent Windows, you can do where vim to find that out 
 (similar to which vim in Unix). Also the :version command within that Vim 
 could help.
 
 On my system, the Cream installer for some reason created a gvim.bat and a 
 couple others, but not vim.bat. I had to launch vim -d with the absolute 
 path to vim.exe.
 
  The files are also empty in vimdiff.
  
 
 When I follow all the same steps so far, I get the swap exists error 
 message I describe in my vim diff, and if I answer readonly or edit 
 anyway I get a diff window with file contents unchanged. File contents in 
 gvim are also unchanged.
 
  I tried to disable all plugins with the --no-plugin switch when launching 
  Vim, but a Message said:
  VIM - ViIMproved 7.4 (2013 Aug 10, compiled Apr 11 2014 15:25:28)
  Unknown option argument: --no-plugin
  More into with: vim -h
  How to disable all plugins except vimdiff?
  The _vimrc is the default file that installed with vim (attached).
 
 Disabling all plugins is done using --noplugin rather than --no-plugin. I 
 do that sometimes too :-)
 
 Also try gvim -d rather than vim -d to see if that helps.

Thank you for all the suggestion Ben, I tried all of them.
Both gvim diff and vim diff causes a.txt and b.txt to become empty:
C:\Users\wolf\My Documentsvim -d a.txt b.txt
C:\Users\wolf\My Documentsgvim -d a.txt b.txt
Same with --noplugin option:
C:\Users\wolf\My Documentsvim --noplugin -d a.txt b.txt
C:\Users\wolf\My Documentsgvim --noplugin -d a.txt b.txt
There was no error message about a swap file existing already.

where vim is running from:
C:\where vim
C:\Program Files (x86)\Vim\vim74\vim.exe

VIM - Vi IMproved splash page says version 7.4.256

version from in within C:\Program Files (x86)\Vim\vim74\vim.exe
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 11 2014 15:27:34)
MS-Windows 32-bit console version
Included patches: 1-256
Compiled by digitec...@spamdancingpaper.com:http://SteveHallArchitecture.com
Huge version without GUI.  Features included (+) or not (-):
+acl+eval   +mouse  +syntax
+arabic +ex_extra   -mouseshape +tag_binary
+autocmd+extra_search   +multi_byte_ime/dyn +tag_old_static
-balloon_eval   +farsi  +multi_lang -tag_any_white
-browse +file_in_path   -mzscheme   -tcl
++builtin_terms +find_in_path   -netbeans_intg  -tgetent
+byte_offset+float  +path_extra -termresponse
+cindent+folding+perl/dyn   +textobjects
+clientserver   -footer +persistent_undo+title
+clipboard  +gettext/dyn-postscript -toolbar
+cmdline_compl  -hangul_input   +printer+user_commands
+cmdline_hist   +iconv/dyn  +profile+vertsplit
+cmdline_info   +insert_expand  +python/dyn +virtualedit
+comments   +jumplist   +python3/dyn+visual
+conceal+keymap +quickfix   +visualextra
+cryptv +langmap+reltime+viminfo
+cscope +libcall+rightleft  +vreplace
+cursorbind +linebreak  +ruby/dyn   +wildignore
+cursorshape+lispindent +scrollbind +wildmenu
+dialog_con +listcmds   +signs  +windows
+diff   +localmap   +smartindent+writebackup
+digraphs   +lua/dyn-sniff  -xfontset
-dnd+menu   +startuptime-xim
-ebcdic +mksession

Re: vimdiff noob question

2014-06-10 Thread wolfv
On Tuesday, June 10, 2014 2:04:19 PM UTC-6, Ben Fritz wrote:
 On Tuesday, June 10, 2014 10:44:29 AM UTC-5, wolfv wrote:
  Both gvim diff and vim diff causes a.txt and b.txt to become empty:
  C:\Users\wolf\My Documentsvim -d a.txt b.txt
  C:\Users\wolf\My Documentsgvim -d a.txt b.txt
  Same with --noplugin option:
  C:\Users\wolf\My Documentsvim --noplugin -d a.txt b.txt
  C:\Users\wolf\My Documentsgvim --noplugin -d a.txt b.txt
  There was no error message about a swap file existing already.
  
  where vim is running from:
  C:\where vim
  C:\Program Files (x86)\Vim\vim74\vim.exe
  
  VIM - Vi IMproved splash page says version 7.4.256
  
  version from in within C:\Program Files (x86)\Vim\vim74\vim.exe
  :version
  VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 11 2014 15:27:34)
  MS-Windows 32-bit console version
  Included patches: 1-256
  Compiled by digitec...@spamdancingpaper.com:http://SteveHallArchitecture.com
  Huge version without GUI.  Features included (+) or not (-):
 
 Everything looks like it should be working :-(
 
 I've never seen behavior like this; it works fine for me.
 
 Maybe we can narrow down where the file gets deleted on your system.
 
 Is it when you create a diff? Try this:
 
   gvim -O a.txt b.txt
   :windo diffthis
 
 Or maybe, it is because you launch a second Vim to edit the same file(s):
 
   gvim -o a.txt b.txt
   vim -o a.txt b.txt

Ben,
The commands you posted produced something interesting, read on.

I manually set a.txt and b.txt to contain unique lines of text.
Then from Command Prompt:
gvim -O a.txt b.txt
opens gvim showing both files as empty.
Looking at Windows Explorer preview pane confirms that both files are indeed 
empty.
Then from inside gvim:
:windo diffthis
A window flashes (opens and closes very fast), but it's too fast for me to see 
what it is.

I manually reset a.txt and b.txt to contain unique lines of text.
Then from Command Prompt:
gvim -o a.txt b.txt
opens gvim showing both files as empty.
But looking at Windows Explorer preview pane, I can see that a.txt is empty and 
b.txt still contains the original text.
Then from Command Prompt:
vim -o a.txt b.txt
an error message pops up:
C:\PROGRA~2\Vim\vim74\vim.exe is not a valid Win32 application.
[OK]
I click the OK button and the Command Prompt line says:
Access is denied.

I think we are on to something.  What does it mean?
Screen shot of Command Prompt is attached.

-- 
-- 
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: vimdiff noob question

2014-06-09 Thread wolfv
On Monday, June 9, 2014 9:18:11 AM UTC-6, Ben Fritz wrote:
 On Sunday, June 8, 2014 9:01:25 PM UTC-5, wolfv wrote:
  
  Same results with:
  vim -d a.txt b.txt
  where a.txt and b.txt contain different text on every line.
  both files end up empty.
 
 Can Vim open these files correctly without using diff mode?
 
 What directory do these files live in? You're not falling victim to Windows' 
 refusing to actually edit stuff in Program Files and such without admin 
 rights, or not actually using the real System32 folder for 32-bit processes, 
 are you?

Thanks for looking into this some more.
I can open and edit vim files as usual when not in diff mode.
a.txt and b.txt files are in C:\Users\wolf\Documents\
What does that mean? - using the real System32 folder for 32-bit processes
The vim was install with all options in their default values.

-- 
-- 
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: vimdiff noob question

2014-06-08 Thread wolfv
On Sunday, June 8, 2014 1:02:00 PM UTC-6, Tony Mechelynck wrote:
 On 08/06/14 07:18, wolfv wrote:
 
  On Saturday, June 7, 2014 7:32:14 PM UTC-6, Tony Mechelynck wrote:
 
  On 07/06/14 21:11, wolfv wrote:
 
 
 
  I am following the example in the vim user manual: 08.7 Viewing 
  differences with vimdiff
 
 
 
  My vimdiff is either broken or I am not understanding something.
 
 
 
 
 
 
 
  In this example, a.txt has serveral lines of text.
 
 
 
  I open vimdiff from the command prompt:
 
 
 
vim -d a.txt~ a.txt
 
 
 
  ~
 
 
 
  ~
 
 
 
  ~
 
 
 
  ~
 
 
 
  vimdiff displays both files as having no lines, and there are no folds.
 
 
 
  Is this how vimdiff is supposed to work?  I was expecting to see some 
  text.
 
 
 
  If I save the file (:w) at this point, the file is overwritten with an 
  empty file.
 
 
 
  Otherwise vimdiff seems to work normally; I am able to insert text into 
  a.txt and save it.
 
 
 
 
 
 
 
  This is my first attempt learning vimdiff and I appreciate your advice.
 
 
 
  Thank you.
 
 
 
 
 
 
 
 
 
 
 
  In order for vimdiff to work, you need to have where Vim can find it
 
 
 
  (usually in your $PATH, or maybe in $VIMRUNTIME) a diff program which
 
 
 
  understands the arguments that vimdiff will send it to find the
 
 
 
  differences between the files. This is usually the case if you run on a
 
 
 
  Unix-like OS, including Linux, Mac OSX, BeOS, etc. On Windows it may or
 
 
 
  may not be the case.
 
 
 
 
 
 
 
  See in particular :help diff-diffexpr and the last paragraph before
 
 
 
  :help diff-patchexpr (without the double quotes in both cases).
 
 
 
 
 
 
 
 
 
 
 
  Best regards,
 
 
 
  Tony.
 
 
 
  --
 
 
 
  meeting, n.:
 
 
 
 An assembly of people coming together to decide what person or
 
 
 
 department not represented in the room must solve a problem.
 
 
 
  Thanks Tony.  My path environment checks out.
 
 
 
  The vim install has C:\Program Files (x86)\Vim\vim74\diff.exe
 
  and PATH environment has variable:
 
  ;C:\Program Files (x86)\Vim\vim74\
 
 
 
  I am running vim 7.4 on Windows 7.
 
  What else can I trouble shoot?
 
 
 
 
 
 I'm not sure. Some programs (including Vim) sometimes have difficulties 
 
 with paths containing spaces. Could you find out the 8.3 form of that 
 
 Program Files (x86) directory name? It ought to be something like 
 
 PROGRA~1 or PROGRA~2. Then you could replace the long name by the 8.3 
 
 name in the $PATH environment variable. There should be no ill effects: 
 
 at worst, nothing will change; at best, the problem will disappear.
 
 
 
 You can get that 8.3 name in Vim by typing
 
   :echo fnamemodify('C:\Program Files (x86)', ':8')
 
 
 
 see
 
   :help fnamemodify()
 
   :help filename-modifiers
 
 
 
 
 
 Best regards,
 
 Tony.
 
 -- 
 
 Your program is sick!  Shoot it and put it out of its memory.

Thank you for the suggestion Tony.
I put ;PROGRA~2 in the Environment variable path, but it made no difference.

-- 
-- 
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: vimdiff noob question

2014-06-08 Thread wolfv
On Sunday, June 8, 2014 7:34:30 PM UTC-6, Tony Mechelynck wrote:
 On 09/06/14 02:39, wolfv wrote:
 
  On Sunday, June 8, 2014 1:04:55 PM UTC-6, Ben Fritz wrote:
 
  On Sunday, June 8, 2014 12:18:24 AM UTC-5, wolfv wrote:
 
 
 
  Thanks Tony.  My path environment checks out.
 
 
 
  The vim install has C:\Program Files (x86)\Vim\vim74\diff.exe
 
  and PATH environment has variable:
 
;C:\Program Files (x86)\Vim\vim74\
 
 
 
  I am running vim 7.4 on Windows 7.
 
  What else can I trouble shoot?
 
 
 
  Check your diffexpr setting. In particular, if you do not have at least 
  Vim 7.4.103, the diffexpr installed by default is incorrect.
 
 
 
  Either update your Vim install to at least patchlevel 103, or see here if 
  you just want to copy the new default diffexpr: 
  http://superuser.com/a/697914/233630
 
 
 
  Thanks Ben.  I installed gvim-7-4-256.exe from 
  http://sourceforge.net/projects/cream/files/
 
  It was installed with the default _vimrc file.
 
  But it made no difference.
 
 
 
  Attached are three screen shots of what my vimdiff is doing.
 
  Here is the weird part: after opening a.txt in vimdiff and closing vimdiff 
  (I did not save or do anything while in vimdiff), I open a.txt shows that 
  a.txt is empty.
 
 
 
  Otherwise vim works normally.
 
 
 
 
 
 Do you get the same problem when you don't use a filename which usually 
 
 means a backup of the other file? Let's say vim -d a.txt b.txt?
 
 
 
 See
 
   :help 'backup'
 
   :help 'backupext'
 
   :help 'writebackup'
 
   :help 'backupcopy'
 
 
 
 
 
 Best regards,
 
 Tony.
 
 -- 
 
 hundred-and-one symptoms of being an internet addict:
 
 122. You ask if the Netaholics Anonymous t-shirt you ordered can be
 
   sent to you via e-mail.

Same results with:
vim -d a.txt b.txt
where a.txt and b.txt contain different text on every line.
both files end up empty.

-- 
-- 
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.


How to start vimdiff?

2014-06-07 Thread wolfv
I would like to learn vimdiff, but haven't got very far.
I can start vim and gvim from the Command Prompt, but not vimdiff.
How to start vimdiff?

Here is what I tried on the Command Prompt:

C:\vimdiff
'vimdiff' is not recognized as an internal or external command,
operable program or batch file.

C:\vim

C:\gvim

C:\

I am running vim 7.4 on Windows 7.

Thank you.

-- 
-- 
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: How to start vimdiff?

2014-06-07 Thread wolfv
On Saturday, June 7, 2014 1:07:37 AM UTC-6, wolfv wrote:
 I would like to learn vimdiff, but haven't got very far.
 I can start vim and gvim from the Command Prompt, but not vimdiff.
 How to start vimdiff?
 
 Here is what I tried on the Command Prompt:
 
 C:\vimdiff
 'vimdiff' is not recognized as an internal or external command,
 operable program or batch file.
 
 C:\vim
 
 C:\gvim
 
 C:\
 
 I am running vim 7.4 on Windows 7.
 
 Thank you.

Thanks.  vim -d worked.
The important thing is that it works.
Just curious why vimdiff gets an error.
The manual says, The easiest way to start editing in diff mode is with the 
vimdiff command.

Here is what I get from the Command Prompt:

C:\vimdiff a.txt b.txt
'vimdiff' is not recognized as an internal or external command,
operable program or batch file.

C:\vim -d a.txt b.txt

C:\vim -d

-- 
-- 
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: How to start vimdiff?

2014-06-07 Thread wolfv
Thanks Tim.  That explains it, there is no vimdiff.bat on my system.

-- 
-- 
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.


noob vimdiff question

2014-06-07 Thread wolfv
I am following the example in the vim user manual: 08.7 Viewing differences 
with vimdiff
My vimdiff is either broken or I am not understanding something.

In this example, a.txt has serveral lines of text.
I open vimdiff from the command prompt:
vim -d a.txt~ a.txt
~
~
~
~
vimdiff displays both files as empty lines, and there are no folds.
Is this how vimdiff is supposed to work?  I was expecting to see some text.
Otherwise vimdiff seems to work normally; I am able to insert text into a.txt 
and save it.

This is my first attempt learning vimdiff and I appreciate your advice.
Thank you.

-- 
-- 
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.


vimdiff noob question

2014-06-07 Thread wolfv
I am following the example in the vim user manual: 08.7 Viewing differences 
with vimdiff
My vimdiff is either broken or I am not understanding something.

In this example, a.txt has serveral lines of text.
I open vimdiff from the command prompt:
vim -d a.txt~ a.txt
~
~
~
~
vimdiff displays both files as having no lines, and there are no folds.
Is this how vimdiff is supposed to work?  I was expecting to see some text.
If I save the file (:w) at this point, the file is overwritten with an empty 
file.
Otherwise vimdiff seems to work normally; I am able to insert text into a.txt 
and save it.

This is my first attempt learning vimdiff and I appreciate your advice.
Thank you.

-- 
-- 
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: vimdiff noob question

2014-06-07 Thread wolfv
On Saturday, June 7, 2014 7:32:14 PM UTC-6, Tony Mechelynck wrote:
 On 07/06/14 21:11, wolfv wrote:
 
  I am following the example in the vim user manual: 08.7 Viewing differences 
  with vimdiff
 
  My vimdiff is either broken or I am not understanding something.
 
 
 
  In this example, a.txt has serveral lines of text.
 
  I open vimdiff from the command prompt:
 
   vim -d a.txt~ a.txt
 
  ~
 
  ~
 
  ~
 
  ~
 
  vimdiff displays both files as having no lines, and there are no folds.
 
  Is this how vimdiff is supposed to work?  I was expecting to see some text.
 
  If I save the file (:w) at this point, the file is overwritten with an 
  empty file.
 
  Otherwise vimdiff seems to work normally; I am able to insert text into 
  a.txt and save it.
 
 
 
  This is my first attempt learning vimdiff and I appreciate your advice.
 
  Thank you.
 
 
 
 
 
 In order for vimdiff to work, you need to have where Vim can find it 
 
 (usually in your $PATH, or maybe in $VIMRUNTIME) a diff program which 
 
 understands the arguments that vimdiff will send it to find the 
 
 differences between the files. This is usually the case if you run on a 
 
 Unix-like OS, including Linux, Mac OSX, BeOS, etc. On Windows it may or 
 
 may not be the case.
 
 
 
 See in particular :help diff-diffexpr and the last paragraph before 
 
 :help diff-patchexpr (without the double quotes in both cases).
 
 
 
 
 
 Best regards,
 
 Tony.
 
 -- 
 
 meeting, n.:
 
   An assembly of people coming together to decide what person or
 
   department not represented in the room must solve a problem.

Thanks Tony.  My path environment checks out.

The vim install has C:\Program Files (x86)\Vim\vim74\diff.exe
and PATH environment has variable:
;C:\Program Files (x86)\Vim\vim74\

I am running vim 7.4 on Windows 7.
What else can I trouble shoot?

-- 
-- 
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: Highlight just headings?

2013-01-13 Thread wolfv
Thanks Shlomi.  What is usr_*?

-- 
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


Highlight just headings?

2013-01-12 Thread wolfv
I use VIM to edit .txt files for personal notes and to-do lists.  I really like 
my setup but sometimes it is hard to pick out the headings.

The only Markdown convention I use is headings.  I turned off Markdown syntax 
because most of the highlighting gets in the way e.g. the “_” underscore in 
URLs, file_names, and paths start italics where I don't want it.  Escape 
characters would slow down typing and reading.

I use Markdown headings for folding.  I do not want the remaining Markdown 
syntax.

Is there a Vim script that has the following three syntax or a plugin where the 
other syntax can be turned off?:
 1. indented wrapping e.g. Block Quotes from reStructuredText (RST)
 2. heading highlighting from Markdown e.g. ##title
 3. folding on the Markdown headings

-- 
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


How to highlight markdown headings in .txt files?

2013-01-11 Thread wolfv
Vim will highlight markdown headings (e.g. #heading1) in files with the 
“.markdown” suffix.

Is there a way to highlight markdown headings in files with the “.txt” sufix?

Thank you.

-- 
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


Re: How to highlight markdown headings in .txt files?

2013-01-11 Thread wolfv
On Friday, January 11, 2013 7:22:43 PM UTC-7, Tim Chase wrote:
 On 01/11/13 20:10, wolfv wrote:
 
  Vim will highlight markdown headings (e.g. #heading1) in files with the 
  �.markdown� suffix.
 
 
 
  Is there a way to highlight markdown headings in files with the �.txt� 
  sufix?
 
 
 
 My 7.2 doesn't seem to do markdown by default.  However, you can 
 
 override the 'filetype' in a .txt file by setting it to the same 
 
 thing it is in a .markdown file.  You can find this with the following:
 
 
 
:e /path/to/file.markdown
 
:set ft?
 
 
 
 take a note of the value, perhaps something obvious like markdown. 
 
   Then use it to set the 'filetype' in your .txt files:
 
 
 
:e /path/to/markdownish_file.txt
 
:set ft=markdown
 
 
 
 If it's something you want to do regularly, you could set up an 
 
 autocmd to set the filetype every time you open a .txt file.
 
 
 
 -tim

Thanks Tim.  That worked!  I added this to my _vimrc file (I am using Vim 7.3):

 if .txt file, render markdown highlighting
au BufRead,BufNewFile *.txt setlocal ft=markdown

-- 
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


Re: why is Vim coloring text in txt files?

2012-01-01 Thread wolfv
OK Tony, I changed my vimrc file, so lines 2  3 read:
source $VIMRUNTIME/vimrc_example.vim
au! vimrcEx FileType text
and it works.  But what does line 3 do?

Thanks,
wolfv
On Jan 1, 2:08 am, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 01/01/12 00:33, wolfv wrote:











  On Dec 31, 2:33 pm, Tony Mechelynckantoine.mechely...@gmail.com
  wrote:
  On 31/12/11 21:44, wolfv wrote:
  Try
           :verbose setlocal tw? wm? fo?
           :echo $HOME
           :scriptnames

  while editing a text file. Then check the help for these options (and
  |fo-table| for the latter one).

  The 2nd and 3rd ex-commands above are to make sure that you put the
  text.vim script at some location where Vim looked for it.

  I don't get the auto-carriage return when I comment this line in
  filetype.vim:
        au BufRead,BufNewFile *.txt,README*,LISEZMOI*,LIESMICH*,LEESMIJ*
  setf text
  Is the auto-carriage return a text-file feature?
  How to turn it off?

  I don't know yet, but maybe the answer to the question above will help
  us debug the problem.

  :verbose setlocal tw? wm? fo?
  textwidth=78
            Last set from C:\Program Files (x86)\Vim
  \vim73\vimrc_example.vim
  wrapmargin=0
  formatoptions=tcq
            Last set from C:\Program Files (x86)\Vim
  \vim73\vimrc_example.vim

  :echo $HOME
  C:\Users\wolf

  :scriptnames
  C:\Program Files (x86)\Vim\vimfiles\filetype.vim
  C:\Users\wolf\vimfiles\after\ftplugin\text.vim
  ... and 27 other files

  After this command, the auto-carriage-return insert stopped:
  :setl textwidth=0

  so I added it to _vimrc:
  au BufRead,BufNewFile *.txt setlocal spell textwidth=0

  thereafter:
  :verbose setlocal tw?
  textwidth=0
            Last set from C:\Program Files (x86)\Vim\vim\_vimrc

  That fixed it!
  Once again Tony, thank you for your help.

 You have the case I mentioned in one of my recent posts: you are
 sourcing the vimrc_example.vim; so you could have added (after the point
 where you source it) the following line in your vimrc:

         au! vimrcEx FileType text

 Remember: DO NOT modify the vimrc_example.vim itself (or anything else
 in the $VIMRUNTIME tree), because any upgrade may silently replace it,
 thus removing any changes you could have made in it.

 Best regards,
 Tony.
 --
 Cahn's Axiom:
         When all else fails, read the instructions.

-- 
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


Re: why is Vim coloring text in txt files?

2012-01-01 Thread wolfv
Thanks Tony.  I couldn't have don't it without you.

On Jan 1, 2:08 pm, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 01/01/12 14:54, wolfv wrote:

  OK Tony, I changed my vimrc file, so lines 2  3 read:
       source $VIMRUNTIME/vimrc_example.vim
       au! vimrcEx FileType text
  and it works.  But what does line 3 do?

 It removes the FileType autocommands for filetype text in autocommand
 group vimrcEx. The vimrc_example.vim includes the following (I'm
 adding line numbers according to the latest version as of this writing):

 66:   augroup vimrcEx
 ...
 69:    For all text files set 'textwidth' to 78 characters.
 70:   autocmd FileType text setlocal textwidth=78
 ...
 82:   augroup END

 The other autocommand defined in that group is not for the same event.

 See:
         :help :augroup
         :help autocmd-define
         :help autocmd-remove

 Best regards,
 Tony.
 --
 Well, see, Joyce, there we were, trapped in the elevator.  Now, I had
 my tennis racquet and the goldfish; she was holding the Crisco.  Surely
 you can imagine how one thing naturally led to another!

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-31 Thread wolfv


On Dec 27, 12:55 am, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 /vimfiles/filetype.vim

  filetype detection script (user customizations)
  I'll say this once only
 if exists(did_load_filetypes)
         finish
 endif

  allow continuation lines
 let s:cpo = cpo
 set cpovim

 augroup filetypedetect

  text files
         au BufRead,BufNewFile
                 \ *.txt,README*,LISEZMOI*,LIESMICH*,LEESMIJ*
                 \ setf text

  add additional filetype detection autocommands above this line
 augroup END
 let cpo = s:cpo
Hi Tony.  After using Vim some more I noticed that my txt files wrap
at column 80.

My vimrc file has:
setlocal lines=72 columns=100

I copied the above filetype.vim file:

When I have no filetype, files wrap at column 100 as desired.  How to
make txt files wrap at column 100?

Thanks,
wolfv

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-31 Thread wolfv
On Dec 31, 11:59 am, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 add a file $HOME/vimfiles/after/ftplugin/text.vim (for Windows)
 In that file, either the following commands:

 setlocal wm=0
 let l:tw = columns

Tony I tried both  setlocal wm=0 and let l:tw = columns (one at
a time) in  $HOME/vimfiles/after/ftplugin/text.vim, but neither line
worked.

Now that I look at the problem more closely, I don't think text is
wrapping, but a carriage return is being inserted automatically.  I
made hidden characters visible:
:set invlist
A blue $ (carriage return) is visible at end of each line.

The lines wrap at column 100 as they should.
However, when the cursor crosses column 80 while I am typing, the
first whitespace left of column 80 is automatically replaced by a blue
$ (carriage return).

I don't get the auto-carriage return when I comment this line in
filetype.vim:
au BufRead,BufNewFile *.txt,README*,LISEZMOI*,LIESMICH*,LEESMIJ*
setf text
Is the auto-carriage return a text-file feature?
How to turn it off?

Thank you for all your help.  I didn't think it would take so long.

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-31 Thread wolfv


On Dec 31, 2:33 pm, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 31/12/11 21:44, wolfv wrote:
 Try
         :verbose setlocal tw? wm? fo?
         :echo $HOME
         :scriptnames

 while editing a text file. Then check the help for these options (and
 |fo-table| for the latter one).

 The 2nd and 3rd ex-commands above are to make sure that you put the
 text.vim script at some location where Vim looked for it.



  I don't get the auto-carriage return when I comment this line in
  filetype.vim:
       au BufRead,BufNewFile *.txt,README*,LISEZMOI*,LIESMICH*,LEESMIJ*
  setf text
  Is the auto-carriage return a text-file feature?
  How to turn it off?

 I don't know yet, but maybe the answer to the question above will help
 us debug the problem.


:verbose setlocal tw? wm? fo?
textwidth=78
 Last set from C:\Program Files (x86)\Vim
\vim73\vimrc_example.vim
wrapmargin=0
formatoptions=tcq
 Last set from C:\Program Files (x86)\Vim
\vim73\vimrc_example.vim

:echo $HOME
C:\Users\wolf

:scriptnames
C:\Program Files (x86)\Vim\vimfiles\filetype.vim
C:\Users\wolf\vimfiles\after\ftplugin\text.vim
... and 27 other files

After this command, the auto-carriage-return insert stopped:
:setl textwidth=0

so I added it to _vimrc:
au BufRead,BufNewFile *.txt setlocal spell textwidth=0

thereafter:
:verbose setlocal tw?
textwidth=0
 Last set from C:\Program Files (x86)\Vim\vim\_vimrc

That fixed it!
Once again Tony, thank you for your help.

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-28 Thread wolfv
On Dec 28, 1:15 am, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 28/12/11 01:53, wolfv wrote:

  Hi Tony.  I didn't get vary far.  Here is what I tried.  From the Vim
  EX Line editor I typed::!mkdir $HOME/vimfiles
  This cmd window popped up:
  C:\Windows\system32\cmd.exe /c mkdir $HOME/vimfilesThe syntax of the
  command is incorrect.shell returned 1Hit any key to close this
  window...
  Is there a syntax error?

 I thought Vim would interpret the environment variable and path
 separators. OK, try the following then:

         :!mkdir %HOME%\vimfiles



  Regards,
  wolfv

 ...and remember: in the Vim lists, bottom-posting is preferred, as shown
 in the signature added by the list router.

 Best regards,
 Tony.
 --
 GALAHAD:   Camelot ...
 LAUNCELOT: Camelot ...
 GAWAIN:    It's only a model.
                   Monty Python and the Holy Grail PYTHON (MONTY)
 PICTURES LTD
Tony,
I added this message below your post in the Reply form.  I guess
that's what bottom posting means.

I tried this from Vim EX Line editor:
:!mkdir %HOME%\vimfiles
E499: Empty file name for '%' or '#', only works with :p:h

I tried this from cmd window:

C:\Users\wolf
 cd %HOME%
The system cannot find the path specified.

What does it mean?

Thanks,
Wolf

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-28 Thread wolfv
On Dec 28, 7:29 pm, John Beckett johnb.beck...@gmail.com wrote:
 wolfv wrote:
  I tried this from cmd window:

  C:\Users\wolf
   cd %HOME%
  The system cannot find the path specified.

 It's a long story, some of which is mentioned 
 at:http://vim.wikia.com/wiki/Filetype.vim
 (search for $HOME).

 The simplest is to use Vim to find what it thinks:

 :echo $HOME

 Then use normal tools (not Vim) to make the required
 directories.

 Re this mailing list:
 Yes, bottom posting is putting your comment last.
 However, it is important to DELETE all junk from the original
 message (just quote what you are replying to).

 John

Thanks John,  that helped me figured out enough to make it work.

I created C:\Program Files (x86)\Vim\vimfiles\filetype.vim and copied
the code that Tony posted on Dec 27, 12:55 into it.
Its not my $HOME, but I am the sole user of this PC, so I guess that's
OK.  Everything works.

:set ft?
filetype=text

The unwanted coloring is out of the text files.  Thanks for all your
help.

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-27 Thread wolfv
Hi Tony.  I didn't get vary far.  Here is what I tried.  From the Vim
EX Line editor I typed::!mkdir $HOME/vimfiles
This cmd window popped up:
C:\Windows\system32\cmd.exe /c mkdir $HOME/vimfilesThe syntax of the
command is incorrect.shell returned 1Hit any key to close this
window...
Is there a syntax error?

Regards,
wolfv

On Dec 27, 12:55 am, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 27/12/11 05:26, wolfv wrote:









  Thanks Tony.  I don't know what else to do.  Most of this Vim code is
  over my head.  I am using Vim 7.3 on Windows 7.  This is what it says
  in my :h runtimepath:

                                     PC, OS/2: $HOME/vimfiles,
                                             $VIM/vimfiles,
                                             $VIMRUNTIME,
                                             $VIM/vimfiles/after,
                                             $HOME/vimfiles/after

     This is a list of directories which will be searched for runtime
     files:
       filetype.vim  filetypes by file name |new-filetype|
       scripts.vim   filetypes by file contents |new-filetype-scripts|
       autoload/     automatically loaded scripts |autoload-functions|
       colors/       color scheme files |:colorscheme|
       compiler/     compiler files |:compiler|
       doc/          documentation |write-local-help|
       ftplugin/     filetype plugins |write-filetype-plugin|
       indent/       indent scripts |indent-expression|
       keymap/       key mapping files |mbyte-keymap|
       lang/         menu translations |:menutrans|
       menu.vim      GUI menus |menu.vim|
       plugin/       plugin scripts |write-plugin|
       print/        files for printing |postscript-print-encoding|
       spell/        spell checking files |spell|
       syntax/       syntax files |mysyntaxfile|
       tutor/        files for vimtutor |tutor|

  So what code do I put in what file?

  Regards,
  wolfv

 All commands I give below should be run from within Vim.

 First, create a vimfiles subfolder in what Vim know as $HOME:

         :!mkdir $HOME/vimfiles

 If you get an error saying that the directory already exists, that's OK.
 For a different error, if it isn't obvious what to do, come back here.

 Second, create a filetype.vim in that new subfolder (I assume that you
 don't yet have one in _that_ directory):

         :e ~/vimfiles/filetype.vim

  filetype detection script (user customizations)
  I'll say this once only
 if exists(did_load_filetypes)
         finish
 endif

  allow continuation lines
 let s:cpo = cpo
 set cpovim

 augroup filetypedetect

  text files
         au BufRead,BufNewFile
                 \ *.txt,README*,LISEZMOI*,LIESMICH*,LEESMIJ*
                 \ setf text

  add additional filetype detection autocommands above this line
 augroup END
 let cpo = s:cpo

 Then save your work:

         :x

 You might also want to set back $VIMRUNTIME/filetype.vim to what it was
 before you changed it.

 The next time you start Vim, it will regard files matching the patterns
 you set in that autocommand as being text files. (I gave an example, you
 may vary it if you prefer a different list: LISEZMOI, LIESMICH and
 LEESMIJ are used for README in French, German and Dutch respectively.)

 Best regards,
 Tony.
 --
 I can remember when a good politician had to be 75 percent ability and
 25 percent actor, but I can well see the day when the reverse could be
 true.
                 -- Harry Truman

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-26 Thread wolfv
Thanks Thilo and Tony.

I Changed my filetype.vim code so when there is a “#” at the beginning
of the first 3 lines, Vim sets generic configuration. i.e. I deleted
this line:

\   || getline(4) =~ '^#' || getline(5) =~ '^#'

My txt files won't have a “#” in the first 3 lines, so that's good
enough.

On Dec 26, 3:38 am, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 26/12/11 10:32, Thilo Six wrote:









  Tony Mechelynck wrote the following on 26.12.2011 10:10

  Hello Tony,

  -- snip  --
  if exists(did_load_filetypes)
       finish
  endif

  Personly i would leave this out as i sometimes deliberately overwrite 
  defaults

  So what? $VIMRUNTIME/filetype.vim sets its filetypes by :setfiletype,
  which does nothing if the filetype is already set. So you can override
  them by setting the filetype in ~/vimfiles/filetype.vim (for Windows) or
  ~/.vim/filetype.vim (for Unix) which is sourced immediately before
  $VIMRUNTIME/filetype.vim.
  -- snip  --

  With the above snipped in '~/.vim/filetype.vim' overriding settings from
  '$VIMRUNTIME/filetype.vim' will NEVER happen (even when setl is stronger 
  then
  setf) when '$VIMRUNTIME/filetype.vim' is sourced prior to 
  '~/.vim/filetype.vim'.

 It is not (as I saw, after writing this, that you mention it below). Vim
 uses the equivalent of :runtime! filetype.vim to source it, and that
 is guaranteed to source the files in the order of the 'runtimepath'
 directories, i.e., on Unix:

 1. ~/.vim/filetype.vim
 2. $VIM/vimfiles/filetype.vim
 3. $VIMRUNTIME/filetype.vim
 4. $VIM/vimfiles/after/filetype.vim
 5. ~/.vim/after/filetype.vim

 or on Windows:

 1. ~/vimfiles/filetype.vim
 2. $VIM/vimfiles/filetype.vim
 3. $VIMRUNTIME/filetype.vim
 4. $VIM/vimfiles/after/filetype.vim
 5. ~/vimfiles/after/filetype.vim

 This order is intentional, and it is followed whenever Vim sources an
 internal runtime script: it means that a local sysadmin can override the
 Vim defaults for his system, and that every user can override for his
 own use what the sysadmin chose for the whole installation.



  But it occurred to me that vims default is to source '~/.vim/filetype.vim' 
  prior
  to '$VIMRUNTIME/filetype.vim' as you also mention above.

  There are lots of ways to shot one self in the feet. Choose the one that 
  suits
  you best.

 One of them that I'm not going to use is reversing the order of the
 'runtimepath' directories while there are intentionally separate
 before and after directories. If you want me to show you how to
 shoot yourself in the foot by using Vim in unsupported ways, just speak
 up (but I'd rather say how _not_ to shoot oneself in the foot): Vim is
 not the kind of software which you can only use the way Mommy decided,
 with only an intentionally limited set of features and only a single
 padlocked manner of doing every single thing that it can do; for that,
 what you need is Notepad. Vim has a lot of customizable features, maybe
 more than you would wish, but I probably set them otherwise than you do,
 and we are both happy. But some of them are not meant to be used in
 foolish ways: you should not set 'term' to pcterm when running on an
 xterm, you should not reverse the order of 'runtimepath' directories,
 you should not manually set 'filetype' to css while editing a C source
 module, you should not try to compile Vim with Borland C using the
 src/make_mvc.mak makefile; and so on.

 Best regards,
 Tony.
 --
 hundred-and-one symptoms of being an internet addict:
 256. You are able to write down over 250 symptoms of being an internet
       addict, even though they only asked for 101.

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-26 Thread wolfv
Thanks Tony.  I don't know what else to do.  Most of this Vim code is
over my head.  I am using Vim 7.3 on Windows 7.  This is what it says
in my :h runtimepath:

PC, OS/2: $HOME/vimfiles,
$VIM/vimfiles,
$VIMRUNTIME,
$VIM/vimfiles/after,
$HOME/vimfiles/after

This is a list of directories which will be searched for runtime
files:
  filetype.vim  filetypes by file name |new-filetype|
  scripts.vim   filetypes by file contents |new-filetype-scripts|
  autoload/ automatically loaded scripts |autoload-functions|
  colors/   color scheme files |:colorscheme|
  compiler/ compiler files |:compiler|
  doc/  documentation |write-local-help|
  ftplugin/ filetype plugins |write-filetype-plugin|
  indent/   indent scripts |indent-expression|
  keymap/   key mapping files |mbyte-keymap|
  lang/ menu translations |:menutrans|
  menu.vim  GUI menus |menu.vim|
  plugin/   plugin scripts |write-plugin|
  print/files for printing |postscript-print-encoding|
  spell/spell checking files |spell|
  syntax/   syntax files |mysyntaxfile|
  tutor/files for vimtutor |tutor|

So what code do I put in what file?

Regards,
wolfv

On Dec 26, 8:27 pm, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 27/12/11 03:49, wolfv wrote:

  Thanks Thilo and Tony.

  I Changed my filetype.vim code so when there is a # at the beginning
  of the first 3 lines, Vim sets generic configuration. i.e. I deleted
  this line:

  \  || getline(4) =~ '^#' || getline(5) =~ '^#'

  My txt files won't have a # in the first 3 lines, so that's good
  enough.

 ...except that making changes in anything in the $VIMRUNTIME tree is one
 quite common way of, as Tim put it, shooting yourself in the foot. Any
 upgrade may (and one of them surely will, next week or next year)
 replace $VIMRUNTIME/filetype.vim by a new version without telling you,
 and any changes you made there will be gone. This is part of the
 normal Vim way of doing things. Local changes should go in the _other_
 directory trees listed in 'runtimepath' (installation-specific in $VIM
 or user-specific in $HOME), $VIMRUNTIME is _only_ for _unchanged_
 versions of runtime files distributed _together_ with Vim.

 Best regards,
 Tony.
 --
 There's no point in being grown up if you can't be childish sometimes.
                 -- Dr. Who

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-25 Thread wolfv
Thanks Dominique.

:verbose set filetype?
filetype=conf
Last set from C:\Program Files (x86)\Vim\vim73\filetype.vim

But filetype.vim does not contain a variable named filetype.

I added the following line to my vimrc file, which makes the text all
black,
au BufRead *.txt syntax off

There is some relevant information on the following links.

Vim sets the ft (and consequently syn) to conf if the file includes
a line starting with #
http://vim.1045645.n5.nabble.com/How-do-you-disable-syntax-highlighting-for-a-specific-file-type-td3380112.html

http://www.cyberciti.biz/faq/turn-on-or-off-color-syntax-highlighting-in-vi-or-vim/

On Dec 25, 4:25 am, Dominique Pellé dominique.pe...@gmail.com wrote:
 Wolfram Volpi wrote:
  Sometimes Vim displays my .txt files in various colors.

  The coloring of the text depends on the position of # (line 4 in the
  examples below).  You can see the colors in the attached png file.

  Is that normal behavior for Vim?  If not, where could this colors be
  coming from?

  I don't think the colors are coming from my vimrc file, but I attached
  it in case you want to take a look.

  I just want black text and maybe colors for Markdown headings.

  Thank you,
  wolfv
  --

  temp2.txt:
  After reopening file in Vim,
  if first line starting with hash (#) starts after column 1
  then
   #hash is black
   'single quote is black'
   double quote is black

  temp3.txt:
  After reopening file in Vim,
  if first line starting with hash (#) starts in column 1
  then
  #hash is blue
   'single quote is pink'
   double quote is pink

 I don't see those colors.

 What does the following Ex command say when you
 edit a *.txt file with the unexpected colors?

   :verbose set filetype?

 If the filetype is set somewhere, it should indicate where
 it comes from.  It might come from one of your installed plugins.

 Regards
 -- Dominique

-- 
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


Re: why is Vim coloring text in txt files?

2011-12-25 Thread wolfv
Thanks Thilo.

I found the Generic configuration code in my C:\Program Files (x86)\Vim
\vim73\filetype.vim
Where in the file should the local configuration code (below) be
placed?

 txt
  autocmd BufNewFile,BufRead
  \ *.txt,
  \*README*
  \ setl ft=text

wolfv

On Dec 25, 9:26 am, Thilo Six t@gmx.de wrote:
 wolfv wrote the following on 25.12.2011 16:50

 Hello









  :verbose set filetype?
  filetype=conf
     Last set from C:\Program Files (x86)\Vim\vim73\filetype.vim

  But filetype.vim does not contain a variable named filetype.

  I added the following line to my vimrc file, which makes the text all
  black,
  au BufRead *.txt syntax off

  There is some relevant information on the following links.

  Vim sets the ft (and consequently syn) to conf if the file includes
  a line starting with #
 http://vim.1045645.n5.nabble.com/How-do-you-disable-syntax-highlighti...

 http://www.cyberciti.biz/faq/turn-on-or-off-color-syntax-highlighting...

 ,[ filetype.vim  ]---

  Generic configuration file (check this last, it's just guessing!)
 au BufNewFile,BufRead,StdinReadPost *
         \ if !did_filetype()  expand(amatch) !~ g:ft_ignore_pat
         \     (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ 
 '^#'
         \       || getline(4) =~ '^#' || getline(5) =~ '^#') |
         \   setf conf |
         \ endif

 `-

 This means when there is a # at the beginning of the first 5 lines AND no 
 other
 filetype has been detected then apply 'ft=conf'.

 It seems that i have the following in my local configuration which eliminates
 this default:

 ,[ ~/.vim/ftdetect/filetype.vim   ]---

    txt
   autocmd BufNewFile,BufRead
       \ *.txt,
       \*README*
       \ setl ft=text
 `-

 -- snip --

 --
 Regards,
 Thilo

 4096R/0xC70B1A8F
 721B 1BA0 095C 1ABA 3FC6  7C18 89A4 A2A0 C70B 1A8F

-- 
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


Re: How to fold by expression using a function?

2011-12-11 Thread wolfv
Thanks again Ben.  I was having the problem you described.  Adding
this line to the vimrc file fixed it:
au BufRead,BufNewFile *.txt so C:\Program Files (x86)\Vim\vimfiles
\ftplugin\markdown.vim
Folding is the only part of markdown I use, so this works for my
situation.

On Dec 3, 8:03 pm, Ben Fritz fritzophre...@gmail.com wrote:
 On Dec 3, 12:39 am, wolfv wolfvo...@gmail.com wrote:

  Ben,

  Problem solved.  Folding worked after I added this source statement to
  the end of my _vimrc file:    so C:\Program Files (x86)\Vim\vimfiles
  \ftplugin\markdown.vim
  Thank you for your help.

 Sadly, that will only work until you edit a file which is not a
 markdown file. And, you should not need to do this.

 Something is causing Vim's filetype detection not to detect your
 markdown file. What is the filename you are editing? The following is
 How my version of Vim detects markdown:

 au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,README.md  setf
 markdown

 This should be fairly self-explanatory I think. Are you editing a
 markdown file with a different extension? Or maybe you're trying to
 edit an empty buffer without an associated file?

-- 
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


How to open 3 files in Vim on Windows startup?

2011-12-10 Thread wolfv
I open the same three text files every time I boot Windows.
So I want Windows 7 to automatically open the three files on startup.
I wrote this batch file and put it in Startup folder:

C:\Program Files (x86)\Vim\vim73\gvim.exe -p file1 file2 file3

Which did what I wanted, but it also left a useless cmd terminal open.
Is there a way to make Windows startup open 3 files in a single Vim
window (three tabs) without leaving the cmd terminal open?

Thank you,
wolfv

-- 
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


Re: How to open 3 files in Vim on Windows startup?

2011-12-10 Thread wolfv
Thanks Jürgen and Marc, I didn't know you could put arguments in the
shortcut.  It worked beautifully!

On Dec 10, 3:45 pm, Juergen Kraemer jottka...@googlemail.com wrote:
 Hi,

 why don't you create a link to gvim.exe directly and give -p and the file 
 name as arguments?

 Regards,
 Jürgen

 wolfv wolfvo...@gmail.com schrieb:







 I open the same three text files every time I boot Windows.
 So I want Windows 7 to automatically open the three files on startup.
 I wrote this batch file and put it in Startup folder:

 C:\Program Files (x86)\Vim\vim73\gvim.exe -p file1 file2 file3

 Which did what I wanted, but it also left a useless cmd terminal open.
 Is there a way to make Windows startup open 3 files in a single Vim
 window (three tabs) without leaving the cmd terminal open?

 Thank you,
 wolfv

 --
 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, visithttp://www.vim.org/maillist.php

-- 
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


Re: How to make _vimrc turn spell checker on for .txt files?

2011-12-05 Thread wolfv
Thanks rgen and Zind.  Lowercase au fixed it.  It's good to use :h.

On Dec 5, 12:03 am, Jürgen Krämer jottka...@googlemail.com wrote:
 Hi,

 wolfv wrote:
  Thanks Rich.  After adding the code to my vimrc file and opening Vim,
  a pop-up message says:

  E492: Not an editor command: Au BufRead,BufNewFile *.txt setlocal
  spell on

 use a lowercase au:

   au BufRead,BufNewFile *.txt setlocal spell on

 Regards,
 J rgen

 --
 Sometimes I think the surest sign that intelligent life exists elsewhere
 in the universe is that none of it has tried to contact us.     (Calvin)

-- 
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


How to make _vimrc turn spell checker on for .txt files?

2011-12-04 Thread wolfv
How to make _vimrc turn spell checker on for .txt files?


Here is the pseudo code:


if filename ends in .txt
setlocal spell on
else
setlocal spell off
endif

Thank you,
wolfv

-- 
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


Re: How to make _vimrc turn spell checker on for .txt files?

2011-12-04 Thread wolfv
Thanks Rich.  After adding the code to my vimrc file and opening Vim,
a pop-up message says:

E492: Not an editor command: Au BufRead,BufNewFile *.txt setlocal
spell on


On Dec 4, 10:29 pm, Rich Healey healey.r...@gmail.com wrote:
 Au BufRead,BufNewFile *.txt setlocal spell on

 Alternately, you can do it with ftdetect and ftplugin files, which is how
 I've taken to doing it, you can see the approach at
 github.com/richoH/dotfiles

-- 
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


How to fold by expression using a function?

2011-12-02 Thread wolfv
How to fold by expression using the Foldexpr_markdown function posted
on https://gist.github.com/1038710 ?

I am running Vim 7.3.46 and do not have vim-voom installed.

I added the following lines to my _vimrc file:
set foldmethod=expr
:so C:\Program Files (x86)\Vim\vimfiles\ftplugin\markdown.vim
:call Foldexpr_markdown(lnum)
but got this message on starting Vim:
Error detected while processing C:\Program Files (x86)\Vim\_vimrc:
line   41:
E121: Undefined variable: lnum
E116: Invalid arguments for function Foldexpr_markdown

Thank you.

-- 
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


Re: How to fold by expression using a function?

2011-12-02 Thread wolfv
Thanks Christian.  Those fixes stopped Vim from complaining on
startup.  But now I get a “E490: No fold found” message.  What did I
do wrong?
I saved the Foldexpr_markdown function in:
C:\Program Files (x86)\Vim\vimfiles\ftplugin\markdown.vim
Is that the right location?

I changed the _vimrc lines to:  set foldmethod=expr set
foldexpr=Foldexpr_markdown(v:lnum)also tried “setlocal” in _vimrc:
setlocal foldmethod=exprsetlocal
foldexpr=Foldexpr_markdown(v:lnum)but either way, I got “E490: No fold
found” message when zc from lines starting with “#”:## test level 2
Thank you.
On Dec 2, 2:02 am, Christian Brabandt cbli...@256bit.org wrote:
 On Fri, December 2, 2011 9:57 am, wolfv wrote:
  How to fold by expression using the Foldexpr_markdown function posted
  onhttps://gist.github.com/1038710?

  I am running Vim 7.3.46 and do not have vim-voom installed.

  I added the following lines to my _vimrc file:
     set foldmethod=expr
     :so C:\Program Files (x86)\Vim\vimfiles\ftplugin\markdown.vim
     :call Foldexpr_markdown(lnum)

 You need to use v:lnum and not lnum and you should not call the function
 manually, vim does it for you:
 set foldexpr=Foldexpr_markdown(v:lnum)

 regards,
 Christian

-- 
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


Re: How to fold by expression using a function?

2011-12-02 Thread wolfv
I am reposting this because the previous post did not format as
expected.  Sorry about the spam.

Thanks Christian.  Those fixes stopped Vim from complaining
on startup.  But now I get a E490: No fold found message.  What did
I do wrong?
I saved the Foldexpr_markdown function in:  C:\Program Files (x86)\Vim
\vimfiles\ftplugin\markdown.vimIs that the right location?
I changed the _vimrc lines to:  set foldmethod=expr set
foldexpr=Foldexpr_markdown(v:lnum)also tried setlocal in _vimrc:
setlocal foldmethod=exprsetlocal
foldexpr=Foldexpr_markdown(v:lnum)but either way, I got E490: No fold
found message when zc from lines starting with #:## test level 2
Thank you.
On Dec 2, 2:02 am, Christian Brabandt cbli...@256bit.org wrote:
 On Fri, December 2, 2011 9:57 am, wolfv wrote:
  How to fold by expression using the Foldexpr_markdown function posted
  onhttps://gist.github.com/1038710?

  I am running Vim 7.3.46 and do not have vim-voom installed.

  I added the following lines to my _vimrc file:
     set foldmethod=expr
     :so C:\Program Files (x86)\Vim\vimfiles\ftplugin\markdown.vim
     :call Foldexpr_markdown(lnum)

 You need to use v:lnum and not lnum and you should not call the function
 manually, vim does it for you:
 set foldexpr=Foldexpr_markdown(v:lnum)

 regards,
 Christian

-- 
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


Re: How to fold by expression using a function?

2011-12-02 Thread wolfv
Ben,
I followed your suggestions (not sure if I understand it all).  But I
still get the “E490: No fold found” message.  Here is what I did:
Moved the markdown.vim file from ftplugin folder to the indent folder.
Added these lines to top of markdown.vim file:
setlocal foldmethod=expr
setlocal foldexpr=Foldexpr_markdown(v:lnum)
I saved the files and then reopened test_fold.txt file, but got “E490:
No fold found” message when zc from lines starting with “#”:
## test level 2
Thank you for your help.
wolfv

On Dec 2, 8:57 am, Ben Fritz fritzophre...@gmail.com wrote:
 On Dec 2, 9:37 am, wolfv wolfvo...@gmail.com wrote:

  Thanks Christian.  Those fixes stopped Vim from complaining on
  startup.  But now I get a “E490: No fold found” message.  What did I
  do wrong?
  I saved the Foldexpr_markdown function in:
          C:\Program Files (x86)\Vim\vimfiles\ftplugin\markdown.vim
  Is that the right location?

  I changed the _vimrc lines to:  set foldmethod=expr     set
  foldexpr=Foldexpr_markdown(v:lnum)also tried “setlocal” in _vimrc:
  setlocal foldmethod=expr        setlocal
  foldexpr=Foldexpr_markdown(v:lnum)but either way, I got “E490: No fold
  found” message when zc from lines starting with “#”:      ## test level 2

 Here's what you should have:

 _vimrc:
 filetype plugin indent on
 OR
 filetype indent on

 C:\Program Files (x86)\Vim\vimfiles\ftplugin\markdown.vim: irrelevant

 C:\Program Files (x86)\Vim\vimfiles\indent\markdown.vim:
 (normal setup for an indent plugin, see a file chosen at random from
 $VIMRUNTIME/indent)
 (definition of Foldexpr_markdown)
 setlocal foldmethod=expr
 setlocal foldexpr=Foldexpr_markdown(v:lnum)

 NOTE: a better place than C:\Program Files (x86)\Vim\vimfiles, is $HOME
 \vimfiles. $HOME defaults to %HOMEDRIVE%%HOMEPATH% on Windows, but the
 easiest way to see where it is, is to type from within Vim,
 :echo $HOME

 The same goes for the _vimrc.

-- 
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


Re: How to fold by expression using a function?

2011-12-02 Thread wolfv
No need to be embarrased.  I moved the markdown.vim file back to C:
\Program Files (x86)\Vim\vimfiles\ftplugin\


output of :verbose set filetype? foldexpr? foldmethod?
filetype=conf
Last set from C:\Program Files (x86)\Vim\vim73\filetype.vim
folderexpr=0
foldemthod=expr
Last set from C:\Program Files (x86)\Vim\_vimrc


markdown.vim file is not in :scriptnames


:set foldcolumn?
foldcolumn=0
:set foldcolumn=3

Still got E490: No fold found message when zc from lines starting
with #.

Thank you for your assistance.

On Dec 2, 12:55 pm, Ben Fritz fritzophre...@gmail.com wrote:
 On Dec 2, 1:52 pm, Ben Fritz fritzophre...@gmail.com wrote:









  On Dec 2, 11:17 am, wolfv wolfvo...@gmail.com wrote:

   Ben,
   I followed your suggestions (not sure if I understand it all).  But I
   still get the “E490: No fold found” message.  Here is what I did:
   Moved the markdown.vim file from ftplugin folder to the indent folder.
   Added these lines to top of markdown.vim file:
           setlocal foldmethod=expr
           setlocal foldexpr=Foldexpr_markdown(v:lnum)
   I saved the files and then reopened test_fold.txt file, but got “E490:
   No fold found” message when zc from lines starting with “#”:
           ## test level 2
   Thank you for your help.
   wolfv

  OOPS!

  Somehow I had your post confused with another. I had indent in my
  head, not folding.

  IGORE MY PREVIOUS ADVICE about the indent folder. You want the
  filetype folder after all.

  Still:

  1. What's the output of:

  :verbose set filetype? foldexpr? foldmethod?

  2. Try setting 'foldcolumn' to some value bigger than 2. Are there any
  other folds defined in the file?

 Also, is the script you created in the ftplugin directory being
 sourced at all? Take a look at :scriptnames to make sure it's there.

 I can't believe my indent confusion...sorry about that. How
 embarrassing!

-- 
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


Re: How to fold by expression using a function?

2011-12-02 Thread wolfv
Ben,

Problem solved.  Folding worked after I added this source statement to
the end of my _vimrc file:so C:\Program Files (x86)\Vim\vimfiles
\ftplugin\markdown.vim
Thank you for your help.

On Dec 2, 12:55 pm, Ben Fritz fritzophre...@gmail.com wrote:
 On Dec 2, 1:52 pm, Ben Fritz fritzophre...@gmail.com wrote:









  On Dec 2, 11:17 am, wolfv wolfvo...@gmail.com wrote:

   Ben,
   I followed your suggestions (not sure if I understand it all).  But I
   still get the “E490: No fold found” message.  Here is what I did:
   Moved the markdown.vim file from ftplugin folder to the indent folder.
   Added these lines to top of markdown.vim file:
           setlocal foldmethod=expr
           setlocal foldexpr=Foldexpr_markdown(v:lnum)
   I saved the files and then reopened test_fold.txt file, but got “E490:
   No fold found” message when zc from lines starting with “#”:
           ## test level 2
   Thank you for your help.
   wolfv

  OOPS!

  Somehow I had your post confused with another. I had indent in my
  head, not folding.

  IGORE MY PREVIOUS ADVICE about the indent folder. You want the
  filetype folder after all.

  Still:

  1. What's the output of:

  :verbose set filetype? foldexpr? foldmethod?

  2. Try setting 'foldcolumn' to some value bigger than 2. Are there any
  other folds defined in the file?

 Also, is the script you created in the ftplugin directory being
 sourced at all? Take a look at :scriptnames to make sure it's there.

 I can't believe my indent confusion...sorry about that. How
 embarrassing!

-- 
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


How to edit vimrc file on Windows 7?

2011-11-26 Thread wolfv
I am attempting to save changes to vimrc file (C:\Program Files
(x86)\Vim\_vimrc) using Vim 7.3.46 on Windows 7.

When I type :w! this message appears:
_vimrc E212: Can't open file for writing
So I tried :w!!, but that didn't work either.

I am logged in as Administrator.  The _vimrc file Properties, Security
tab, says
Permissions for Administrators, Allow Write
The Read-only attribute is not checked.

How to edit vimrc file on Windows 7?

-- 
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


Can VIM display two files simultaneously?

2011-10-12 Thread wolfv
I am considering learning VIM (vim-cucumber to be exact).
Can VIM display two files simultaneously (a step definitions file and
it's feature file)?

Thanks.

-- 
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