Re: Spell not checking spelling
On Jun 11, 2011, at 12:47 PM, Tim Gray wrote: > Correct me if I'm wring but 'txt' isn't a Vim filetype. Thanks, Tim. I am Vim-naive. I assumed "filetype" was simply "extent," and that getting an extent recognized was simply a matter of using it. I see from checking help that it's a bit more complicated than that. > I'm guessing when your vim opens up files with the .txt extension they have > no filetype. You can check this by running the command 'set ft?'. Instead > you'll either need to turn spelling on for all files which I showed you how > to do in a previous email or you need to change you common below to use the > BufRead and BufNewFile triggers to turn on spell checking for any file with > the txt extension. Something like > > au BufRead,BufNewFile *.txt setlocal spell spelllang=en As I understand it, I could create a "txt" filetype. While I'm not clear at this point how to do that, would there be any reason to prefer one method over the other, i.e., your suggestion or creating a new filetype? -- Eric Weir Decatur, GA USA eew...@bellsouth.net -- You received this message from the "vim_mac" 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: Spell not checking spelling
Correct me if I'm wring but 'txt' isn't a Vim filetype. I'm guessing when your vim opens up files with the .txt extension they have no filetype. You can check this by running the command 'set ft?'. Instead you'll either need to turn spelling on for all files which I showed you how to do in a previous email or you need to change you common below to use the BufRead and BufNewFile triggers to turn on spell checking for any file with the txt extension. Something like au BufRead,BufNewFile *.txt setlocal spell spelllang=en On Jun 10, 2011, at 7:28 PM, Eric Weir wrote: > > I have the following in my .vimrc, but spell is not checking spelling in that > filetype. > >au FileType txt setlocal spell spelllang=en_us > > This is not something I came up with on my own. I am not capable of that. > > Help appreciated. > > -- > Eric Weir > Decatur, GA USA > eew...@bellsouth.net > > > > > -- > You received this message from the "vim_mac" 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 from the "vim_mac" 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: Environment Variables for MacVim
On 06/11/2011 at 2:57pm Stephen Rasku wrote: > I have some customizations in my .vimrc that depend on environment variables > to work. > If I call MacVim from the terminal these customizations work but if I launch > it from the dock it doesn't. > I assume this is because my .bashrc is not sourced when launching from the > dock but it is when > running from the terminal. Is there a way to ensure that the environment > variables are set even > when MacVim is launched from the dock? Put these environment variables in file ${HOME}/.MacOSX/environment.plist This only works if the variables are static. Within this file no shell evaluations, and therefore no dynamic settings, are possible. To edit this file without a proper property file editor use on command line: plutil -convert xml1 ${HOME}/.MacOSX/environment.plist vim ${HOME}/.MacOSX/environment.plist # or mvim ${HOME}/.MacOSX/environment.plist # save plutil -convert binary1 ${HOME}/.MacOSX/environment.plist The syntax of this file is pretty simple: http://www.apple.com/DTDs/PropertyList-1.0.dtd";> VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE ... "VARIABLE_NAME" and "VARIABLE_VALUE" of course have to be replaced with the actual variable name, respectively it's value. There's no quoting done for values containing space(s), i.e. no double quotes around the value, because in this XML structure spaces already are preserved. After a re-login the environment variables set this way should be effective. Me personally would remove them from any shell rc file (.profile, .bashrc, .zshrc, etc) for avoiding "misbehavior"; Otherwise one might edit just one place that sets these variables and forget about the other. A short note at last: these variables are as of then, of course, not set when MacVim (or any other program) is launched form Dock, but on login and inherited to the started program the normal way (i.e.: the parent makes the child process launched inherit it's environment settings). Hope that helps. Regards, Peter -- You received this message from the "vim_mac" 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: Environment Variables for MacVim
are you launching mvim or vi in terminal? if is mvim, than in the menu, click on 'edit; than select startup settings, see if you that is using the same .vimrc file, however, what is used in macvim gui should act the same to vi terminal, only some of the color schemes don't work under both. On Sat, Jun 11, 2011 at 11:07 PM, Ben Schmidt wrote: > On 11/06/11 10:57 PM, Stephen Rasku wrote: > >> I have some customizations in my .vimrc that depend on environment >> variables to work. If I call MacVim from the terminal these >> customizations work but if I launch it from the dock it doesn't. I >> assume this is because my .bashrc is not sourced when launching from >> the dock but it is when running from the terminal. Is there a way to >> ensure that the environment variables are set even when MacVim is >> launched from the dock? >> > > Hi, Stephen, > > Sounds like you have things in your .bashrc (for interactive non-login > shells--or, for some insane reason I have yet to understand, > non-interactive non-login shells when invoked by ssh) that you want in > .profile (for login shells). MacVim, like Terminal, launches a login > shell when it starts Vim instances. But for MacVim it is not an > interactive shell. > > Ben. > > > > -- > You received this message from the "vim_mac" 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 from the "vim_mac" 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: Environment Variables for MacVim
On 11/06/11 10:57 PM, Stephen Rasku wrote: I have some customizations in my .vimrc that depend on environment variables to work. If I call MacVim from the terminal these customizations work but if I launch it from the dock it doesn't. I assume this is because my .bashrc is not sourced when launching from the dock but it is when running from the terminal. Is there a way to ensure that the environment variables are set even when MacVim is launched from the dock? Hi, Stephen, Sounds like you have things in your .bashrc (for interactive non-login shells--or, for some insane reason I have yet to understand, non-interactive non-login shells when invoked by ssh) that you want in .profile (for login shells). MacVim, like Terminal, launches a login shell when it starts Vim instances. But for MacVim it is not an interactive shell. Ben. -- You received this message from the "vim_mac" 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
Environment Variables for MacVim
I have some customizations in my .vimrc that depend on environment variables to work. If I call MacVim from the terminal these customizations work but if I launch it from the dock it doesn't. I assume this is because my .bashrc is not sourced when launching from the dock but it is when running from the terminal. Is there a way to ensure that the environment variables are set even when MacVim is launched from the dock? ...Stephen -- You received this message from the "vim_mac" 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