| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ |
|
|
|
|
|
| |
We'll let toggle_option_flags.vim raise the errors, and we won't bother
with the version number testing.
|
|
|
|
|
|
|
|
| |
From what I understand from ":help if", ancient Vim and/or vim-tiny
without the 'eval' feature will simply gloss over all commands between
:if and :endif without executing them. Therefore as soon as we test a
version, we're implicitly excluding everything that doesn't have 'eval'
anyway.
|
|
|
|
| |
May as well refer to the actual command I'm using.
|
|
|
|
|
|
|
|
|
|
|
| |
The Google VimScript Guide says:
<https://google.github.io/styleguide/vimscriptfull.xml#Portability>
> Always use case-explicit operators for strings (=~# and =~?, never =~).
>
> This also applies to !~ == != > >= < and <=
> This only applies for strings. == and >= are fine for numbers, but ==#
> and >=# must be used for strings.
|
|
|
|
| |
This approach allows more flexibility from the caller's side.
|
|
|
|
| |
Just to keep related things together.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
:help version6.txt, /^Patch 6\.1\.142:
> Patch 6.1.142
> Problem: Defining paragraphs without a separating blank line isn't
> possible. Paragraphs can't be formatted automatically.
> Solution: Allow defining paragraphs with lines that end in white
> space. Added the 'w' and 'a' flags in 'formatoptions'.
> Files: runtime/doc/change.txt, src/edit.c, src/misc1.c,
> src/normal.c, src/option.h, src/ops.c, src/proto/edit.pro,
> src/proto/ops.pro, src/vim.h
|
|
|
|
|
|
| |
Put in appropriate 'eval' checks and adjust the order of evaluation so
that vim-tiny doesn't try to run all this and fail due to the absence of
'eval' for :let.
|
|
|
|
|
| |
This is implemented in the same way as done for 'fo'-'a'; testing for
the presence of the flag based on known version tests first.
|
|
|
|
|
| |
A bit clearer as the mapping was clearly called in error, and results in
not being able to do what was need.
|
| |
|
|
|
|
| |
Use the result to decide how to map <Leader>a.
|
|
|
|
| |
We'll use this in a subsequent commit to decide how to map <Leader>j.
|
|
|
|
| |
I have found it works correctly on an instance of Vim 7.0.
|
|
|
|
|
| |
If I ever care, this needs more careful testing to find the version in
which the flag was added.
|
|
|
|
| |
'InsertEnter' and 'InsertLeave' are not autocmd events in Vim 6.1.
|
|
|
|
|
|
| |
'vnoremap' also includes select mode, which I very seldom use anyway; in
this context it's not worth breaking compatibility with old Vims to use
the more accurate 'xnoremap'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* feature/spin-vim-plug:
Rename toggle plugin again, use commands not funcs
Add short documentation for new custom plugins
Use same comment boilerplate for custom plugins
Check 'eval' feature for loading command_typos.vim
Wrap detect_background.vim func call in 'silent!'
Rename and refactor option toggle plugin
Don't suggest mappings in Vim plugin comments
Move Vim background detection logic into plugin
Specify an install-vim-autoload target
Spin 'fo' toggle out into new flag toggler plugin
Spin copyable linebreak config into new plugin
Spin stable join config out into new plugin
Use <Plug> prefix, make space strip configurable
Rename a misnamed variable in big_file.vim
Rename bigfile plugin to big_file
Move trailing space strip config into plugin
Separate command typos config to plugin
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
This prevents older versions of Vim like 6.2 from throwing "E1017:
Missing braces" on merely parsing this code, even though they don't
evaluate it.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Renamed to flag_toggle.vim and placed in autoload using the namespaced
autoload function syntax.
I'm not sure this is the right approach yet, but I seem to pretty rarely
use a Vim earlier than 7.1 these days.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
Tentatively named command_typos.vim. I've just moved this as-is for now,
but it will need review, especially the hardcoded mappings.
|
| |
| |
| |
| |
| | |
This was causing a tiny build of Vim to raise errors about :let being
an unavailable command.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`vint -s` says:
vim/config/leader.vim:2:5: Make the scope explicit like
`g:mapleader` (see Anti-pattern of vimrc (Scope of identifier))
vim/config/leader.vim:3:5: Make the scope explicit like
`g:maplocalleader` (see Anti-pattern of vimrc (Scope of identifier))
This does still seem to work with the prefixes, despite not being the
way the documentation specifies the variables.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This should allow me to mentally separate actions specific to a buffer
type from actions that apply to buffers in general. It also removes the
overlap of <leader>l for 'list' toggling and filetype linting.
From ":help maplocalleader":
> <LocalLeader> is just like <Leader>, except that it uses
> "maplocalleader" instead of "mapleader". <LocalLeader> is to be used
> for mappings which are local to a buffer. Example:
>
> :map <buffer> <LocalLeader>A oanother line<Esc>
>
> In a global plugin <Leader> should be used and in a filetype plugin
> <LocalLeader>. "mapleader" and "maplocalleader" can be equal.
> Although, if you make them different, there is a smaller chance of
> mappings from global plugins to clash with mappings for filetype
> plugins. For example, you could keep "mapleader" at the default
> backslash, and set "maplocalleader" to an underscore.
|
| |
| |
| |
| |
| |
| |
| | |
From ":help <LocalLeader>":
> In a global plugin <Leader> should be used and in a filetype plugin
> <LocalLeader>. "mapleader" and "maplocalleader" can be equal.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
* hotfix/v0.4.2:
Require eval feature for netrw opts assignment
Bump version number to 0.4.2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Tiny builds of Vim that exclude the eval feature throw errors at the
:let commands in this file:
$ vim.tiny
Error detected while processing /home/tom/.vim/config/netrw.vim:
line 2:
E319: Sorry, the command is not available in this version: let g:netrw_banner = 0
line 5:
E319: Sorry, the command is not available in this version: let g:netrw_silent = 1
line 8:
E319: Sorry, the command is not available in this version: let g:netrw_liststyle = 3
line 11:
E319: Sorry, the command is not available in this version: let g:netrw_list_hide = '^\.$,^tags$'
Press ENTER or type command to continue
This code was not being run on such builds before commit 538b71c,
because it was in an "after" directory for the netrw plugin and would
have been skipped.
Wrapping a check for has('eval') around this whole file fixes the
problem. netrw.vim won't run without this feature anyway.
|
|\| |
| |/
|/|
| |
| |
| | |
* hotfix/v0.4.1:
Don't show search option state on mode changes
Bump version number to 0.4.1
|
| |
| |
| |
| |
| |
| |
| | |
Commit 92f2c78 added these suffixes to the option settings to show the
value of the option after it had been set, but this isn't actually
appropriate for the autocmd here; it means the value of 'hlsearch' is
echoed every time insert mode is entered or left.
|
|/
|
|
|
| |
Looks like this was added in a1ee04d for v0.4.0 and was intended to
replace the file in its correct path at vim/config/comment.vim.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* feature/vim-plugin:
Have bigfileturn local syntax off (configurably)
Make bigfile 'synmaxcol' setting configurable
Refactor plugin function for dependency injection
Rename variable and autocmd to use plugin prefix
Make bigfile size variable an option with default
Expand comment header for bigfile.vim
Move Vim big file options config into plugin
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Since it pertains to the casing of text, and there are potentially other
items that could go in here too.
|
|/
|
|
|
|
| |
It makes more sense next to 'shellslash' in vim/config/command.vim than
it does in vim/config/term.vim; the latter file is supposed to describe
settings related to the terminal, not the shell.
|
|
|
|
| |
This was added in 52671ad, but not finished.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the very weird syntax:
:setlocal option! option?
We can toggle the option and print its new value in the same line. For
the line breaking options, we only show the value of the 'linebreak'
option, because otherwise we print three lines of messages, which
requires an <Enter> press, even if we put all three `option?` calls on
one :setlocal line.
|
|
|
|
|
|
|
|
| |
That is, \h and \i shouldn't change the value of the search highlighting
or incremental search features globally, just per-buffer.
I'm not actually completely sure I want this, but it does seem tidier at
the moment.
|
|
|
|
|
| |
Just in case somebody tried to use it to strip whitespace only from a
selected range. It could maybe be extended to do this somehow.
|
|
|
|
|
| |
It makes much more sense in this file than it did in the whitespace
configuration file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a tidier method of preserving the cursor position after a
normal-mode join that doesn't involve wiping away a mark, though I don't
use those too often anyway.
It still works with a preceding count via the `v:count1` variable, with
an accidental feature: this joins the *next* v:count1 lines, as opposed
to joining a *total* of v:count1 lines counting the current one. The
latter is what Vim does, but the former is what I'd actually expect,
thinking of it as a "repeated operation", so I'm going to leave it this
way.
|
|
|
|
| |
Just for clarity of reading.
|