Skip to content

Tags: inkarkat/swapit

Tags

archive/retire-SwapListLoadFT

Toggle archive/retire-SwapListLoadFT's commit message
Retire :SwapListLoadFT.

This command doesn't make sense when :filetype plugin on (which most users have), as the filetype load mechanism automatically will source the swap list script when the filetype is set. It has never been documented, anyway. This may have been introduced to restore the current filetype's swap lists after opening of another buffer clobbered them, but that has now been addressed by using buffer-local variables.

archive/allow-command-chaining

Toggle archive/allow-command-chaining's commit message
Allow command chaining for :ClearSwapList and :SwapIdea

Especially for :ClearSwapList, one may want to put this into
    let b:undo_ftplugin .= '|ClearSwapList'

To enable appending other such commands, the command must support chaining, and because it doesn't take arguments, this is trivially done through -bar.

archive/buffer-local-swaplist

Toggle archive/buffer-local-swaplist's commit message
Update documentation with b:swap_lists.

Also, I've removed the duplicate multi-word swap list comment from the plugin, as this is already explained at :help swapit-multiword. Probably, a lot more unnecessary stuff should be cut from the plugin's comment header.

archive/swaplist-precedence

Toggle archive/swaplist-precedence's commit message
Correctly merge g:default_swap_list with g:swap_lists.

So that lists with the same name do not create duplicates (which later lead to clash queries), but the (filetype-specific) latter one overrides the default. This allows to redefine a global swap list with a filetype-specific one.

archive/fix-xml-handling

Toggle archive/fix-xml-handling's commit message
Check for active matchit.vim plugin, and else skip XML tag swap.

The commands for XML tag swapping require the modified "%" command provided by the matchit.vim plugin. Without it, the commands will wreak havoc on the text.
Add a check for the plugin and if not installed, fall back to the general swap, which will only work on the current tag (not the tag pair).

archive/swap-count

Toggle archive/swap-count's commit message
Avoid clobbering the 'a mark.

In Vim 7.2 and higher, the '" mark can be used instead. It is far less likely to disrupt the user's operation.

archive/fix-single-char-selection

Toggle archive/fix-single-char-selection's commit message
Use :norm only for the matchit % jumps, and avoid clobbering the jump…

…list.

archive/fix-visual-selection-exclusive

Toggle archive/fix-visual-selection-exclusive's commit message
FIX: Correct re-selection of multi words with selection=exclusive.

The last character (position `]) isn't included in the selection, step one character right to fix that.

archive/fix-choices-out-of-bounds

Toggle archive/fix-choices-out-of-bounds's commit message
Show correct choice when moving backward.

At the first element, the index is turned into -1, the modulo operation leaves that alone, and Vim indexing accesses the last element, leading to a correct wrap-around.

archive/visualmode-avoid-beep

Toggle archive/visualmode-avoid-beep's commit message
Avoid beep when using visual mode mappings.

After the yank, we're already in normal mode. No need for the <Esc>, which causes a beep otherwise.