| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
This is optional; if the user's Vim doesn't have the 'user_commands'
feature, the command will just quietly not be created.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Got carried away and rewrote a lot of this all in one hit.
* Show single-line error messages with an s:Error() function
* Flag early errors on nonexistent options
* Test for the flag both before and after trying to toggle it to use as
the basis for error reporting and return value, in a new s:Has()
function
|
|
|
|
| |
This likely got butchered by a wayward search-and-replace.
|
|
|
|
|
| |
I couldn't find this function at first, but it's what I need: a way to
check whether a string appears in another one.
|
|
|
|
|
|
| |
strlen() is older, and also more specific to what we want to do. len()
just happens to work on strings, but was introduced for counting Lists
and Dictionaries.
|
|
|
|
| |
This allows e.g.: ':ToggleOptionFlag fillchars diff: '; note the whitespace!
|
|
|
|
|
|
|
|
| |
This commit extends toggle_option_flag.vim to allow the exported
commands to toggle values of more than one character, for
comma-separated options like 'switchbuf', e.g.:
:ToggleOptionFlag switchbuf useopen
|
|
|
|
| |
Just to avoid confusing it with something like l:option.
|
|
|
|
|
| |
These are functionally equivalent; it's just clearer and more
editing-friendly to do one thing at a time.
|
|
|
|
| |
\a and \L are, I think, perlre-style VimL regex inventions.
|
|
|
|
|
| |
These are technically not really needed, but this is more consistent
with good style recommendations in the Google VimScript style guide.
|
|
|
|
| |
May as well refer to the actual command I'm using.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Google Vimscript Style Guide says:
<https://google.github.io/styleguide/vimscriptguide.xml#Commands>
> Excluding [!] prevents your plugin from silently clobbering existing
> commands. Command conflicts should be resolved by the user.
This makes sense to me as we can think of <Plug> mapping and user
commands as being the user-accessible portion of the interface, rather
than the functions which can be properly namespaced with
autoload#Syntax(), if exposed at all.
|
|
|
|
|
| |
Only a small subset of option names actually apply, so I'm not entirely
sure this is actually better than nothing.
|
|
|
|
|
| |
Prepend the line :delete command with a :silent to stop it reporting the
number of lines it removed.
|
|
|
|
|
|
|
| |
Using BufReadPre meant that it was too early to set the 'syntax' option
locally for the buffer. This fixes that, and also works correctly for
cases where the buffer does not necessarily correspond to a file on
disk.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set a g:loaded_* flag to prevent repeated reloads, and refuse to load at
all if &compatible is set or if required features are missing.
Some more accommodating plugins avoid the problems 'compatible' causes
by saving its value at startup into a script variable, setting the
option to the Vim default, and then restoring it when the plugin is
done, to prevent any of its flags from interfering in the plugin code:
let s:save_cpo = &cpo
set cpo&vim
...
let &cpo = s:save_cpo
unlet s:save_cpo
I don't want this boilerplate, so I'm going to do what Tim Pope's
modules seem to, and just have the plugin refuse to do a single thing if
'compatible' is set.
|
|\
| |
| |
| |
| | |
* feature/space-dots:
Use spaces around concat dots in VimL consistently
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Including renaming big_file.vim and accompanying functions yet again, to
big_file_options.vim.
Trying to keep complex autocmd and mapping definitions on long lines
broken up semantically; definition and options on one line, patterns or
mapping key on the next, and the command to run on the last.
Also trying to make sure that <silent>, <buffer>, and <unique> are
applied in the correct places, and that all mapping commands are using
the :<C-U> idiom for the command prefix.
|
|
|
|
|
|
| |
This method makes a bit more sense, and amounts to slightly less verbose
mapping commands. It does really on the +user_commands feature being
available, however.
|
|
|
|
| |
A brief explanation, an author name, and the license should do fine.
|
|
|
|
|
| |
I strongly suspect the presence of 'user_commands' implies it, but I'm
not sure.
|
|
|
|
| |
Pretty useless, really.
|
|
|
|
|
|
|
|
|
| |
This is an experimental new plugin that provides a command to toggle
individual single-character flags in an option with a value of a set of
such flags, in my case 'formatoptions'.
A fair bit of evil eval()ing via :execute here, but I've tried to
control it with some strict patern matching.
|
|
|
|
|
| |
Calling this one copy_linebreak.vim. Renamed both the internal function
and the plugin key.
|
|
|
|
|
| |
Again using the <Plug> mapping abstraction and not defining the mapping
for the user.
|
|
|
|
|
|
| |
This properly abstracts out the StripTrailingWhitespace mapping rather
than forcing it to <leader>x within the plugin itself. A bit nicer this
way.
|
|
|
|
| |
The word "size" was added to this variable's name unnecesarily.
|
|
|
|
|
|
|
|
| |
Just for consistency with the other plugins I'm making.
I don't think I really like the cutesy names given to Vim plugins. I
prefer the slightly longer and maybe even namespaced names like Perl
distributions and modules have. Let's see how well this works.
|
| |
|
|
|
|
|
| |
Tentatively named command_typos.vim. I've just moved this as-is for now,
but it will need review, especially the hardcoded mappings.
|
| |
|
|
|
|
|
| |
Defaults to 256 columns and only sets it if the option's value isn't
already lower than that.
|
|
|
|
|
|
|
| |
Pass the filename to check and the size limit into the function directly
from the autocmd hook.
Improve commenting and spacing as we go.
|
|
|
|
|
|
| |
Just removing an underscore from the variable name so that
g:big_file_size becomes g:bigfile_size, and remove the "dotfiles" prefix
from the autocmd.
|
|
|
|
|
| |
This arranges for g:big_file_size only to set itself to 10 MiB if the
variable is not already set, presumably by the user in their vimrc.
|
|
|
|
| |
Include some author and license metadata.
|
|
Created targets install-vim-doc and install-vim-plugin with accompanying
subdirectories of "vim".
Added a very short summary of what the plugin does to bigfile.txt.
I intend to spin off at least a couple of the blocks of my Vim
configuration that are starting to coalesce into distinct plugins unto
themselves, and will place the files in these directories.
|