mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
0c0469c4f5
commit
3906b2d4fc
2
runtime/autoload/dist/ft.vim
vendored
2
runtime/autoload/dist/ft.vim
vendored
@ -1,7 +1,7 @@
|
|||||||
" Vim functions for file type detection
|
" Vim functions for file type detection
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2021 Dec 17
|
" Last Change: 2022 Jan 11
|
||||||
|
|
||||||
" These functions are moved here from runtime/filetype.vim to make startup
|
" These functions are moved here from runtime/filetype.vim to make startup
|
||||||
" faster.
|
" faster.
|
||||||
|
@ -40,10 +40,10 @@ effects. Be careful not to destroy your text.
|
|||||||
2. Defining autocommands *autocmd-define*
|
2. Defining autocommands *autocmd-define*
|
||||||
|
|
||||||
*:au* *:autocmd*
|
*:au* *:autocmd*
|
||||||
:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
|
:au[tocmd] [group] {event} {aupat} [++once] [++nested] {cmd}
|
||||||
Add {cmd} to the list of commands that Vim will
|
Add {cmd} to the list of commands that Vim will
|
||||||
execute automatically on {event} for a file matching
|
execute automatically on {event} for a file matching
|
||||||
{pat} |autocmd-pattern|.
|
{aupat} |autocmd-pattern|.
|
||||||
Note: A quote character is seen as argument to the
|
Note: A quote character is seen as argument to the
|
||||||
:autocmd and won't start a comment.
|
:autocmd and won't start a comment.
|
||||||
Nvim always adds {cmd} after existing autocommands so
|
Nvim always adds {cmd} after existing autocommands so
|
||||||
@ -119,19 +119,19 @@ prompt. When one command outputs two messages this can happen anyway.
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
3. Removing autocommands *autocmd-remove*
|
3. Removing autocommands *autocmd-remove*
|
||||||
|
|
||||||
:au[tocmd]! [group] {event} {pat} [++once] [++nested] {cmd}
|
:au[tocmd]! [group] {event} {aupat} [++once] [++nested] {cmd}
|
||||||
Remove all autocommands associated with {event} and
|
Remove all autocommands associated with {event} and
|
||||||
{pat}, and add the command {cmd}.
|
{aupat}, and add the command {cmd}.
|
||||||
See |autocmd-once| for [++once].
|
See |autocmd-once| for [++once].
|
||||||
See |autocmd-nested| for [++nested].
|
See |autocmd-nested| for [++nested].
|
||||||
|
|
||||||
:au[tocmd]! [group] {event} {pat}
|
:au[tocmd]! [group] {event} {aupat}
|
||||||
Remove all autocommands associated with {event} and
|
Remove all autocommands associated with {event} and
|
||||||
{pat}.
|
{aupat}.
|
||||||
|
|
||||||
:au[tocmd]! [group] * {pat}
|
:au[tocmd]! [group] * {aupat}
|
||||||
Remove all autocommands associated with {pat} for all
|
Remove all autocommands associated with {aupat} for
|
||||||
events.
|
all events.
|
||||||
|
|
||||||
:au[tocmd]! [group] {event}
|
:au[tocmd]! [group] {event}
|
||||||
Remove ALL autocommands for {event}.
|
Remove ALL autocommands for {event}.
|
||||||
@ -151,12 +151,12 @@ with ":augroup"); otherwise, Vim uses the group defined with [group].
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
4. Listing autocommands *autocmd-list*
|
4. Listing autocommands *autocmd-list*
|
||||||
|
|
||||||
:au[tocmd] [group] {event} {pat}
|
:au[tocmd] [group] {event} {aupat}
|
||||||
Show the autocommands associated with {event} and
|
Show the autocommands associated with {event} and
|
||||||
{pat}.
|
{aupat}.
|
||||||
|
|
||||||
:au[tocmd] [group] * {pat}
|
:au[tocmd] [group] * {aupat}
|
||||||
Show the autocommands associated with {pat} for all
|
Show the autocommands associated with {aupat} for all
|
||||||
events.
|
events.
|
||||||
|
|
||||||
:au[tocmd] [group] {event}
|
:au[tocmd] [group] {event}
|
||||||
@ -1075,16 +1075,16 @@ WinScrolled After scrolling the viewport of the current
|
|||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
6. Patterns *autocmd-pattern* *{pat}*
|
6. Patterns *autocmd-pattern* *{aupat}*
|
||||||
|
|
||||||
The {pat} argument can be a comma separated list. This works as if the
|
The {aupat} argument of `:autocmd` can be a comma separated list. This works
|
||||||
command was given with each pattern separately. Thus this command: >
|
as if the command was given with each pattern separately. Thus this command: >
|
||||||
:autocmd BufRead *.txt,*.info set et
|
:autocmd BufRead *.txt,*.info set et
|
||||||
Is equivalent to: >
|
Is equivalent to: >
|
||||||
:autocmd BufRead *.txt set et
|
:autocmd BufRead *.txt set et
|
||||||
:autocmd BufRead *.info set et
|
:autocmd BufRead *.info set et
|
||||||
|
|
||||||
The file pattern {pat} is tested for a match against the file name in one of
|
The file pattern {aupat} is tested for a match against the file name in one of
|
||||||
two ways:
|
two ways:
|
||||||
1. When there is no '/' in the pattern, Vim checks for a match against only
|
1. When there is no '/' in the pattern, Vim checks for a match against only
|
||||||
the tail part of the file name (without its leading directory path).
|
the tail part of the file name (without its leading directory path).
|
||||||
|
@ -1331,6 +1331,7 @@ current directory for that window. Windows where the |:lcd| command has not
|
|||||||
been used stick to the global or tab-local directory. When jumping to another
|
been used stick to the global or tab-local directory. When jumping to another
|
||||||
window the current directory is changed to the last specified local current
|
window the current directory is changed to the last specified local current
|
||||||
directory. If none was specified, the global or tab-local directory is used.
|
directory. If none was specified, the global or tab-local directory is used.
|
||||||
|
When creating a new window it inherits the local directory of the current window.
|
||||||
|
|
||||||
When changing tabs the same behaviour applies. If the current tab has no
|
When changing tabs the same behaviour applies. If the current tab has no
|
||||||
local working directory the global working directory is used.
|
local working directory the global working directory is used.
|
||||||
|
@ -244,7 +244,7 @@ go through the main loop (e.g. to update the display), return "\<Ignore>".
|
|||||||
This is similar to "nothing" but makes Vim return from the loop that waits for
|
This is similar to "nothing" but makes Vim return from the loop that waits for
|
||||||
input.
|
input.
|
||||||
|
|
||||||
Also, keep in mind that the expression may be evaluated when looking for
|
Keep in mind that the expression may be evaluated when looking for
|
||||||
typeahead, before the previous command has been executed. For example: >
|
typeahead, before the previous command has been executed. For example: >
|
||||||
func StoreColumn()
|
func StoreColumn()
|
||||||
let g:column = col('.')
|
let g:column = col('.')
|
||||||
|
@ -358,19 +358,19 @@ g8 Print the hex values of the bytes used in the
|
|||||||
:redi[r] END End redirecting messages.
|
:redi[r] END End redirecting messages.
|
||||||
|
|
||||||
*:filt* *:filter*
|
*:filt* *:filter*
|
||||||
:filt[er][!] {pat} {command}
|
:filt[er][!] {pattern} {command}
|
||||||
:filt[er][!] /{pat}/ {command}
|
:filt[er][!] /{pattern}/ {command}
|
||||||
Restrict the output of {command} to lines matching
|
Restrict the output of {command} to lines matching
|
||||||
with {pat}. For example, to list only xml files: >
|
with {pattern}. For example, to list only xml files: >
|
||||||
:filter /\.xml$/ oldfiles
|
:filter /\.xml$/ oldfiles
|
||||||
< If the [!] is given, restrict the output of {command}
|
< If the [!] is given, restrict the output of {command}
|
||||||
to lines that do NOT match {pat}.
|
to lines that do NOT match {pattern}.
|
||||||
|
|
||||||
{pat} is a Vim search pattern. Instead of enclosing
|
{pattern} is a Vim search pattern. Instead of enclosing
|
||||||
it in / any non-ID character (see |'isident'|) can be
|
it in / any non-ID character (see |'isident'|) can be
|
||||||
used, so long as it does not appear in {pat}. Without
|
used, so long as it does not appear in {pattern}.
|
||||||
the enclosing character the pattern cannot include the
|
Without the enclosing character the pattern cannot
|
||||||
bar character. 'ignorecase' is not used.
|
include the bar character. 'ignorecase' is not used.
|
||||||
|
|
||||||
The pattern is matched against the relevant part of
|
The pattern is matched against the relevant part of
|
||||||
the output, not necessarily the whole line. Only some
|
the output, not necessarily the whole line. Only some
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types
|
" Vim support file to detect file types
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2022 Jan 05
|
" Last Change: 2022 Jan 13
|
||||||
|
|
||||||
" Listen very carefully, I will say this only once
|
" Listen very carefully, I will say this only once
|
||||||
if exists("did_load_filetypes")
|
if exists("did_load_filetypes")
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"
|
"
|
||||||
" Author: Bram Moolenaar
|
" Author: Bram Moolenaar
|
||||||
" Copyright: Vim license applies, see ":help license"
|
" Copyright: Vim license applies, see ":help license"
|
||||||
" Last Change: 2021 Dec 16
|
" Last Change: 2022 Jan 13
|
||||||
"
|
"
|
||||||
" WORK IN PROGRESS - Only the basics work
|
" WORK IN PROGRESS - Only the basics work
|
||||||
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
||||||
@ -1344,6 +1344,15 @@ func s:HandleCursor(msg)
|
|||||||
if lnum =~ '^[0-9]*$'
|
if lnum =~ '^[0-9]*$'
|
||||||
call s:GotoSourcewinOrCreateIt()
|
call s:GotoSourcewinOrCreateIt()
|
||||||
if expand('%:p') != fnamemodify(fname, ':p')
|
if expand('%:p') != fnamemodify(fname, ':p')
|
||||||
|
augroup Termdebug
|
||||||
|
" Always open a file read-only instead of showing the ATTENTION
|
||||||
|
" prompt, since we are unlikely to want to edit the file.
|
||||||
|
" The file may be changed but not saved, warn for that.
|
||||||
|
au SwapExists * echohl WarningMsg
|
||||||
|
\ | echo 'Warning: file is being edited elsewhere'
|
||||||
|
\ | echohl None
|
||||||
|
\ | let v:swapchoice = 'o'
|
||||||
|
augroup END
|
||||||
if &modified
|
if &modified
|
||||||
" TODO: find existing window
|
" TODO: find existing window
|
||||||
exe 'split ' . fnameescape(fname)
|
exe 'split ' . fnameescape(fname)
|
||||||
@ -1352,6 +1361,9 @@ func s:HandleCursor(msg)
|
|||||||
else
|
else
|
||||||
exe 'edit ' . fnameescape(fname)
|
exe 'edit ' . fnameescape(fname)
|
||||||
endif
|
endif
|
||||||
|
augroup Termdebug
|
||||||
|
au! SwapExists
|
||||||
|
augroup END
|
||||||
endif
|
endif
|
||||||
exe lnum
|
exe lnum
|
||||||
normal! zv
|
normal! zv
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
|
" Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
|
||||||
" Maintainer: Quentin Hibon (github user hiqua)
|
" Maintainer: Quentin Hibon (github user hiqua)
|
||||||
" Version: 0.4
|
" Version: 0.4
|
||||||
" Last Change: 2022 Jan 04
|
" Last Change: 2022 Jan 15
|
||||||
|
|
||||||
" References:
|
" References:
|
||||||
" http://i3wm.org/docs/userguide.html#configuring
|
" http://i3wm.org/docs/userguide.html#configuring
|
||||||
@ -175,7 +175,7 @@ syn keyword i3ConfigDrawingMarksKeyword show_marks contained
|
|||||||
syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDrawingMarksKeyword
|
syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDrawingMarksKeyword
|
||||||
|
|
||||||
" Group mode/bar
|
" Group mode/bar
|
||||||
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_min_width workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||||
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||||
|
|
||||||
" Line continuation
|
" Line continuation
|
||||||
|
@ -1644,15 +1644,6 @@ msgstr " [w]"
|
|||||||
msgid " written"
|
msgid " written"
|
||||||
msgstr " 書込み"
|
msgstr " 書込み"
|
||||||
|
|
||||||
msgid "E205: Patchmode: can't save original file"
|
|
||||||
msgstr "E205: patchmode: 原本ファイルを保存できません"
|
|
||||||
|
|
||||||
msgid "E206: patchmode: can't touch empty original file"
|
|
||||||
msgstr "E206: patchmode: 空の原本ファイルをtouchできません"
|
|
||||||
|
|
||||||
msgid "E207: Can't delete backup file"
|
|
||||||
msgstr "E207: バックアップファイルを消せません"
|
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"WARNING: Original file may be lost or damaged\n"
|
"WARNING: Original file may be lost or damaged\n"
|
||||||
|
@ -1644,15 +1644,6 @@ msgstr " [w]"
|
|||||||
msgid " written"
|
msgid " written"
|
||||||
msgstr " 書込み"
|
msgstr " 書込み"
|
||||||
|
|
||||||
msgid "E205: Patchmode: can't save original file"
|
|
||||||
msgstr "E205: patchmode: 原本ファイルを保存できません"
|
|
||||||
|
|
||||||
msgid "E206: patchmode: can't touch empty original file"
|
|
||||||
msgstr "E206: patchmode: 空の原本ファイルをtouchできません"
|
|
||||||
|
|
||||||
msgid "E207: Can't delete backup file"
|
|
||||||
msgstr "E207: バックアップファイルを消せません"
|
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"WARNING: Original file may be lost or damaged\n"
|
"WARNING: Original file may be lost or damaged\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user