Thursday, June 20, 2013

Re: Where to put "set iskeyword+=_" or remove "iskeyword-=_

Marcin,

I'd like to keep the information you provided as reference. If I can get over this small hurdle with the least customization, I'll take it for now simply because I've been banging at this for a while (with your much appreciated help).
--------------------------------------------------
Ben,

It turns out that the following works:

syntax on
au Syntax tex setl isk+=_

I didn't even need the autocmd lines:

autocmd BufNewFile,BufRead,BufWinEnter *.tex setl isk+=_ | setg isk+=_

autocmd BufNewFile,BufRead,BufWinEnter *.bib setg isk+=_ | setl isk+=_

The problem is essentially solved that this point. What follows describes what I did in response to your advice on checking whether $HOME/vimfiles/after/syntax/tex.vim runs -- it does not. The word "after" doesn't even show up in the :scriptnames listing below. I think I will save that for another day. But if you have any suggestions (without going out of your way to dig), I'd be happy to follow up to the extent that I can.

Thanks !!
--------------------------------------------------
"~" is my short hand for $HOME, which I set in my personal _vimrc via:

let $HOME=$USERPROFILE."/Documents"
set rtp^=$HOME/vimfiles

I copied the vimfiles directory tree to .vim just as a desparate act, it didn't make any rational sense.

In the code above, $USERPROFILE is C:\Users\MyUserAccount, which makes $HOME become C:\Users\MyUserAccount\Documents. I had to explicitly set up $HOME above because the default points at a network drive, which I don't have access to unless I'm connected on-site. However, explicitly setting $HOME in _vimrc means that $HOME is set only when my personal _vimrc is run. Since $HOME is not properly set prior to executing my personal _vimrc, I used VIMINIT to ensure that it would be _vimrc be initially executed

Windows 7 user variable VIMINIT
-------------------------------
source %USERPROFILE%\Documents\_vimrc

I'm sure that my $HOME is as expected because changes to _vimrc take place right away, e.g.:

command TEST echo "YES TEST IS WORKING"

Furthermore, :scriptnames shows a number of accesses to files in my personal vimfiles directory tree:

1: C:/Users/MyUserAccount/Documents/_vimrc
2: C:/Users/MyUserAccount/Documents/vimfiles/colors/mine.vim
3: C:/Program Files (x86)/Vim/vim73/filetype.vim
4: C:/Program Files (x86)/Vim/vim73/menu.vim
5: C:/Program Files (x86)/Vim/vim73/autoload/paste.vim
6: C:/Program Files (x86)/Vim/vim73/ftplugin.vim
7: C:/Users/MyUserAccount/Documents/vimfiles/plugin/bufexplorer.vim
8: C:/Program Files (x86)/Vim/vim73/plugin/getscriptPlugin.vim
9: C:/Program Files (x86)/Vim/vim73/plugin/gzip.vim
10: C:/Program Files (x86)/Vim/vim73/plugin/matchparen.vim
11: C:/Program Files (x86)/Vim/vim73/plugin/netrwPlugin.vim
12: C:/Program Files (x86)/Vim/vim73/plugin/rrhelper.vim
13: C:/Program Files (x86)/Vim/vim73/plugin/spellfile.vim
14: C:/Program Files (x86)/Vim/vim73/plugin/tarPlugin.vim
15: C:/Program Files (x86)/Vim/vim73/plugin/tohtml.vim
16: C:/Program Files (x86)/Vim/vim73/plugin/vimballPlugin.vim
17: C:/Program Files (x86)/Vim/vim73/plugin/zipPlugin.vim
18: C:/Program Files (x86)/Vim/vim73/ftplugin/tex.vim
19: C:/Program Files (x86)/Vim/vim73/ftplugin/plaintex.vim
20: C:/Program Files (x86)/Vim/vim73/ftplugin/initex.vim
21: C:/Program Files (x86)/Vim/vim73/syntax/syntax.vim
22: C:/Program Files (x86)/Vim/vim73/syntax/synload.vim
23: C:/Program Files (x86)/Vim/vim73/colors/blue.vim
24: C:/Program Files (x86)/Vim/vim73/syntax/syncolor.vim
25: C:/Program Files (x86)/Vim/vim73/syntax/tex.vim
26: C:/Program Files (x86)/Vim/vim73/scripts.vim
27: C:/Program Files (x86)/Vim/vim73/ftplugin/help.vim
28: C:/Program Files (x86)/Vim/vim73/syntax/help.vim
29: C:/Program Files (x86)/Vim/vim73/ftplugin/vim.vim
30: C:/Program Files (x86)/Vim/vim73/syntax/vim.vim
31: C:/Program Files (x86)/Vim/vim73/autoload/netrw.vim
32: C:/Users/MyUserAccount/Documents/vimfiles/.netrwhist
33: C:/Program Files (x86)/Vim/vim73/syntax/netrw.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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: