-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into tabsidebar
- Loading branch information
Showing
24 changed files
with
143 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
vim9script | ||
|
||
# Maintainer: Maxim Kim <[email protected]> | ||
# Last Update: 2024-04-26 | ||
# Last Update: 2024-09-24 | ||
# | ||
# Toggle comments | ||
# Usage: | ||
|
@@ -10,6 +10,7 @@ vim9script | |
# nnoremap <silent> <expr> gc comment.Toggle() | ||
# xnoremap <silent> <expr> gc comment.Toggle() | ||
# nnoremap <silent> <expr> gcc comment.Toggle() .. '_' | ||
# nnoremap <silent> <expr> gC comment.Toggle() .. '$' | ||
export def Toggle(...args: list<string>): string | ||
if len(args) == 0 | ||
&opfunc = matchstr(expand('<stack>'), '[^. ]*\ze[') | ||
|
@@ -19,6 +20,19 @@ export def Toggle(...args: list<string>): string | |
var cms = substitute(substitute(&cms, '\S\zs%s\s*', ' %s', ''), '%s\ze\S', '%s ', '') | ||
var [lnum1, lnum2] = [line("'["), line("']")] | ||
var cms_l = split(escape(cms, '*.'), '\s*%s\s*') | ||
|
||
var first_col = indent(lnum1) | ||
var start_col = getpos("'[")[2] | ||
if len(cms_l) == 1 && lnum1 == lnum2 && first_col < start_col | ||
var line_start = getline(lnum1)[0 : max(0, start_col - 2)] | ||
var line_end = getline(lnum1)[start_col - 1 : -1] | ||
line_end = line_end =~# $'^\s*{cms_l[0]}' ? | ||
\ substitute(line_end, $'^\s*\zs{cms_l[0]}', '', '') : | ||
\ printf(substitute(cms, '%s\@!', '%%', 'g'), line_end) | ||
setline(lnum1, line_start .. line_end) | ||
return '' | ||
endif | ||
|
||
if len(cms_l) == 0 | return '' | endif | ||
if len(cms_l) == 1 | call add(cms_l, '') | endif | ||
var comment = 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
b:comment_first_col comment.txt /*b:comment_first_col* | ||
comment.txt comment.txt /*comment.txt* | ||
g:comment_first_col comment.txt /*g:comment_first_col* | ||
gcG comment.txt /*gcG* | ||
gcc comment.txt /*gcc* | ||
gcip comment.txt /*gcip* | ||
o_gc comment.txt /*o_gc* | ||
v_gc comment.txt /*v_gc* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
" Language: indent(1) configuration file | ||
" Maintainer: Doug Kearns <[email protected]> | ||
" Previous Maintainer: Nikolai Weibull <[email protected]> | ||
" Last Change: 2021 Nov 17 | ||
" Last Change: 2024 Sep 29 | ||
" indent_is_bsd: If exists, will change somewhat to match BSD implementation | ||
" | ||
" TODO: is the deny-all (a la lilo.vim nice or no?)... | ||
|
@@ -34,7 +34,7 @@ endif | |
syn match indentOptions '-\%(bli\|c\%([bl]i\|[dip]\)\=\|di\=\|ip\=\|lc\=\|pp\=i\|sbi\|ts\|-\%(brace-indent\|comment-indentation\|case-brace-indentation\|declaration-comment-column\|continuation-indentation\|case-indentation\|else-endif-column\|line-comments-indentation\|declaration-indentation\|indent-level\|parameter-indentation\|line-length\|comment-line-length\|paren-indentation\|preprocessor-indentation\|struct-brace-indentation\|tab-size\)\)' | ||
\ nextgroup=indentNumber skipwhite skipempty | ||
|
||
syn match indentNumber display contained '\d\+\>' | ||
syn match indentNumber display contained '-\=\d\+\>' | ||
|
||
syn match indentOptions '-T' | ||
\ nextgroup=indentIdent skipwhite skipempty | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.