Bug: Erroneous Cannot create directory in mkdir('foo/bar/', 'p')

2013-08-20 Fir de Conversatie David Barnett
Ensure ./foo doesn't exist, and do :call mkdir('foo/bar/', 'p') Vim gives you an error: E739: Cannot create directory: foo/bar/ but the directory was created just fine. Dropping the trailing slash works without error: :call mkdir('foo/bar', 'p') David -- -- You received this message

Re: Bug: Erroneous Cannot create directory in mkdir('foo/bar/', 'p')

2013-08-20 Fir de Conversatie David Barnett
Oh, and this happens even with :call mkdir('foo/', 'p') Seems like all that matters is the trailing slash and the 'p' flag, nothing special about the path. David -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to.

Re: Bug: Erroneous Cannot create directory in mkdir('foo/bar/', 'p')

2013-08-21 Fir de Conversatie David Barnett
mar...@gedmin.as wrote: On Wed, Aug 21, 2013 at 01:56:31PM +0300, LCD 47 wrote: On 20 August 2013, David Barnett daviebd...@gmail.com wrote: Ensure ./foo doesn't exist, and do :call mkdir('foo/bar/', 'p') Vim gives you an error: E739: Cannot create directory: foo/bar

Re: Patch: formatoptions in ftplugins

2013-10-01 Fir de Conversatie David Barnett
...@gmail.com wrote: On Mon, Sep 30, 2013 at 9:57 AM, David Barnett daviebd...@gmail.com wrote: I've found the built-in ftplugin files are all over the place with respect to handling 'formatoptions'. Some ftplugins don't touch it, many clobber useful user preferences. I put together a patch

Re: Patch: formatoptions in ftplugins

2013-10-01 Fir de Conversatie David Barnett
). Then if it's truly part of the standard, you have options to bake that into the built-in files. David On Tue, Oct 1, 2013 at 9:46 AM, Ajit Thakkar thakkar.a...@gmail.com wrote: On Tuesday, October 1, 2013 12:16:38 PM UTC-3, David Barnett wrote: I'm confident we can get consensus to at least

Re: Patch: formatoptions in ftplugins

2013-10-05 Fir de Conversatie David Barnett
at 12:52 PM, Bram Moolenaar b...@moolenaar.net wrote: David Barnett wrote: +Nikolai +Bram +Tim (authors of the majority of these plugins) I'm confident we can get consensus to at least remove a few of those formatoptions modifications. You should also add setlocal

Don't fire FileType until BufRead / BufNewFile finish?

2013-10-18 Fir de Conversatie David Barnett
I recently discovered that the FileType autocmd can fire in the middle of the sequence of BufRead autocmds if you have several BufRead/BufNewFile autocmds like: autocmd BufRead *.foo setfiletype foo autocmd BufRead *.foo set shiftwidth=8 autocmd FileType foo set shiftwidth=4 This can

E117 from :return command bypasses try..catch

2013-11-19 Fir de Conversatie David Barnett
I discovered a bug in try..catch. E117 bypasses the catch and always bubbles up to the user if it comes from a :return command in code like the following: function E_117_Bad() abort try return foo#Bar() catch /.*/ endtry endfunction but not if the exception comes from any other command

Re: E117 from :return command bypasses try..catch

2013-11-19 Fir de Conversatie David Barnett
On Tue, Nov 19, 2013 at 8:13 PM, Benjamin Klein b...@silver-chalice.comwrote: This may be irrelevant but as it isn’t defined here: What is foo#Bar()? Heh, that's exactly the point. E117 is Unknown function (sorry, should have mentioned that). foo#Bar() was my dummy undefined function. David

Re: E117 from :return command bypasses try..catch

2013-11-19 Fir de Conversatie David Barnett
. David On Tue, Nov 19, 2013 at 8:52 PM, Nikolay Pavlov zyx@gmail.com wrote: On Nov 20, 2013 8:17 AM, David Barnett daviebd...@gmail.com wrote: On Tue, Nov 19, 2013 at 8:13 PM, Benjamin Klein b...@silver-chalice.com wrote: This may be irrelevant but as it isn’t defined here: What

Re: when searching for files, upward search with a relative path no longer works in vim7.4

2013-12-27 Fir de Conversatie David Barnett
Manuel, are you referring to a regression or a long-standing TODO for find_file_in_path? It sounds to me like a serious problem, but maybe one that not a lot of people use very heavily (at least not yet on vim 7.4?). Aaron, are you able to bisect and find an exact version where this appeared?

Re: Patch: formatoptions in ftplugins

2014-02-01 Fir de Conversatie David Barnett
So, this hasn't gotten a lot of traction. Clearly it's a controversial issue, maybe we can ignore all the thorny questions about the other options for now and just focus on the fo-=t part first? Can we agree that every standard ftplugin should have setlocal formatoptions-=t ? I should be able

Fixing gf (goto file) to not be special-cased for netrw

2013-02-23 Fir de Conversatie David Barnett
I tried setting up my own BufReadCmd autocmds for perforce depot paths (of the form //depot/*) and found that trying to jump to those files with gf fails with this error message: E447: Can't find file //depot/foo in path I was confused why this worked for netrw and not for my script. Turns out

HTML omnicomplete eats CSS property names

2012-07-28 Fir de Conversatie David Barnett
Hi, I noticed an issue with omnicomplete in vim 7.3.617. If I open vim with vim foo.html and then type div style=display:C-XC-O then the display: part disappears. So if I select inline from the dropdown, I'm left with div style=inline If I type a space immediately before C-XC-O then

Python interface vim.command breaks Hit-enter mode

2012-09-05 Fir de Conversatie David Barnett
I noticed that if Vim is in Hit-enter mode when a command gets run in the background via vim.command(), vim officially stays in Hit-enter mode (vim.eval('mode()') continues to return 'r'), but the Hit-enter display disappears. A similar problem occurs if you're using the list wildmode when

java_highlight_functions breaks syntax folding

2013-01-16 Fir de Conversatie David Barnett
Steps to reproduce: 1. Add let java_highlight_functions = 'style' to the top of your .vimrc 2. Open any Java file with multiple levels of nesting 3. :set foldmethod=syntax foldlevel=0 Results: No folds appear. Expected results: Every set of curly braces should trigger one level of folds. If you

Criteria for including new filetypes in vim?

2014-07-06 Fir de Conversatie David Barnett
Are there any particular criteria for whether a filetype should be included in vim's built-in runfiles? I have a vroom filetype plugin https://github.com/google/vim-ft.vroom with syntax and settings for vroom https://github.com/google/vroom script files that I'm thinking about proposing for

[patch] Add vroom filetype with syntax

2014-07-10 Fir de Conversatie David Barnett
d8d7de0a150b runtime/ftplugin/vroom.vim --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/runtime/ftplugin/vroom.vim Thu Jul 10 10:11:44 2014 -0700 @@ -0,0 +1,35 @@ + Vim filetype plugin file + Language: Vroom (vim testing and executable documentation) + Maintainer: David Barnett (https://github.com

[patch] Separate filetype for JSON

2014-07-14 Fir de Conversatie David Barnett
@@ -0,0 +1,17 @@ + Vim filetype plugin + Language: JSON + Maintainer: David Barnett daviebdawg+...@gmail.com + Last Change: 2014 Jul 10 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = 'setlocal formatoptions comments commentstring' + +setlocal

[Patch] Add go filetype with syntax

2014-08-18 Fir de Conversatie David Barnett
. For more options, visit https://groups.google.com/d/optout. diff -r 7af530381fec runtime/compiler/go.vim --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/runtime/compiler/go.vim Mon Aug 18 09:49:30 2014 -0700 @@ -0,0 +1,29 @@ + Vim compiler file + Compiler: Go + Maintainer: David Barnett (https

[patch] Add bzl filetype with syntax, ftplugin, and indent

2015-08-11 Fir de Conversatie David Barnett
call s:FTlpc() diff -r 2ffb934a31db runtime/ftplugin/bzl.vim --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/runtime/ftplugin/bzl.vim Tue Aug 11 09:29:56 2015 -0700 @@ -0,0 +1,94 @@ + Vim filetype plugin file + Language: Bazel (http://bazel.io) + Maintainer: David Barnett (https://github.com

Re: [patch] Add bzl filetype with syntax, ftplugin, and indent

2015-09-25 Fir de Conversatie David Barnett
On Tuesday, September 8, 2015 at 10:46:38 AM UTC-7, David Barnett wrote: > Is this still getting merged soon? I saw a few updates in vim in the last few > weeks but haven't seen this patch land yet. > > > David Sent this as a pull request: https://github.com/vim/vim/p

Re: Vim Java Syntax Patch

2018-02-16 Fir de Conversatie David Barnett
On Friday, February 2, 2018 at 3:20:59 PM UTC-8, Sam Lijin wrote: > Oops, missed this email. > > Bram: is there any chance you could also review the Java syntax patches? > > I'd volunteer to do it, but I've been busy with personal stuff lately and > haven't been able to make guarantees about

Re: Vim Java Syntax Patch

2018-02-16 Fir de Conversatie David Barnett
+Dan On Fri, Feb 16, 2018 at 2:26 PM David Barnett <daviebd...@gmail.com> wrote: > On Friday, February 2, 2018 at 3:20:59 PM UTC-8, Sam Lijin wrote: > > Oops, missed this email. > > > > Bram: is there any chance you could also review the Java syntax patches?

Patch for vim text filetype ('com' and 'cms' settings, README ftdetect)

2014-07-08 Fir de Conversatie 'David Barnett' via vim_dev
Hi, Could you integrate the attached patch (or some variation) into vim, under the vim license? It includes: - A change to the ftdetect rule to consider files named README as text. - An ftplugin to override 'comments' and 'commentstring' for text files, since the default is not at all

Re: Patch for vim text filetype ('com' and 'cms' settings, README ftdetect)

2014-07-08 Fir de Conversatie 'David Barnett' via vim_dev
(Forgot the attachment) David On Tue, Jul 8, 2014 at 12:31 PM, David Barnett dbarn...@google.com wrote: Hi, Could you integrate the attached patch (or some variation) into vim, under the vim license? It includes: - A change to the ftdetect rule to consider files named README

Re: [patch] Separate filetype for JSON

2014-07-15 Fir de Conversatie 'David Barnett' via vim_dev
into vim? David On Tue, Jul 15, 2014 at 3:03 PM, LCD 47 lcd...@gmail.com wrote: On 14 July 2014, David Barnett dbarn...@google.com wrote: This is a patch to create a separate json filetype and use it for *.json files instead of using javascript. It currently just forwards indent and syntax

Re: [patch] Add vroom filetype with syntax

2014-07-24 Fir de Conversatie 'David Barnett' via vim_dev
I haven't seen this change in the repository yet. Is it still in the queue? David On Sat, Jul 12, 2014 at 8:52 AM, Bram Moolenaar b...@moolenaar.net wrote: David Barnett wrote: I've attached a patch to add a vroom filetype into vim, with syntax highlighting and filetype configuration

Re: [Patch] Add go filetype with syntax

2014-08-22 Fir de Conversatie 'David Barnett' via vim_dev
configuring comments, commentstring, and formatoptions anyway. David On Fri, Aug 22, 2014 at 8:42 AM, Bram Moolenaar b...@moolenaar.net wrote: David Barnett wrote: I've attached a patch to add a go filetype to vim, with syntax highlighting and filetype configuration. I also updated the vim-ft

Re: [Patch] Add go filetype with syntax

2014-08-22 Fir de Conversatie 'David Barnett' via vim_dev
On Fri, Aug 22, 2014 at 10:41 AM, Tony Mechelynck antoine.mechely...@gmail.com wrote: If there's no quick ftdetect rule (by the filename), there might be a slow ftdetect rule (by the file contents). I meant quick in terms of effort to set up, actually. I'd rather drop any contentious changes

Re: [Patch] Add go filetype with syntax

2014-08-22 Fir de Conversatie 'David Barnett' via vim_dev
it. David On Fri, Aug 22, 2014 at 10:53 AM, David Barnett dbarn...@google.com wrote: On Fri, Aug 22, 2014 at 10:41 AM, Tony Mechelynck antoine.mechely...@gmail.com wrote: If there's no quick ftdetect rule (by the filename), there might be a slow ftdetect rule (by the file contents). I

[Patch] Detect .bash_aliases file as sh filetype

2014-12-03 Fir de Conversatie 'David Barnett' via vim_dev
I've included a patch below to apply the sh filetype for files called .bash_aliases*. (I'm not exactly sure what the * is for, but I followed suit from .bash_profile and .bash_logout.) Could you merge this patch into vim? diff -r 4604a182f04c runtime/filetype.vim --- a/runtime/filetype.vim Sun

Re: [patch] Add bzl filetype with syntax, ftplugin, and indent

2015-09-08 Fir de Conversatie 'David Barnett' via vim_dev
Is this still getting merged soon? I saw a few updates in vim in the last few weeks but haven't seen this patch land yet. David On Wed, Aug 12, 2015 at 1:04 PM, Bram Moolenaar <b...@moolenaar.net> wrote: > > David Barnett wrote: > > > I've attached a patch to add a &q