mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 20:10:05 +08:00
Compare commits
No commits in common. "0d66e319342f99b6120016e3abe9e1b01a6fb734" and "e79d1ea754a0cc34d3773a65c356b7523e599fd1" have entirely different histories.
0d66e31934
...
e79d1ea754
@ -152,11 +152,7 @@ function! s:mappings() abort
|
||||
call SpaceVim#mapping#space#langSPC('nmap', ['l', 'r'],
|
||||
\ 'call call('
|
||||
\ . string(function('s:run_code_in_block'))
|
||||
\ . ', [])', 'run-code-bl', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nmap', ['l', 'f'],
|
||||
\ 'call call('
|
||||
\ . string(function('s:format_code_block'))
|
||||
\ . ', [])', 'format-code-block', 1)
|
||||
\ . ', [])', 'run code in block', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nmap', ['l','c'], 'GenTocGFM', 'create content at cursor', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nmap', ['l','C'], 'RemoveToc', 'remove content', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nmap', ['l','u'], 'UpdateToc', 'update content', 1)
|
||||
@ -240,15 +236,6 @@ function! s:run_code_in_block() abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:format_code_block() abort
|
||||
let cf = context_filetype#get()
|
||||
if cf.filetype !=# 'markdown'
|
||||
let command = printf('%s,%sFormat! %s', cf.range[0][0], cf.range[1][0], cf.filetype)
|
||||
exe command
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
function! SpaceVim#layers#lang#markdown#health() abort
|
||||
call SpaceVim#layers#lang#markdown#plugins()
|
||||
|
@ -37,10 +37,10 @@ require('format').setup({
|
||||
custom_formatters = {
|
||||
lua = {
|
||||
exe = 'stylua',
|
||||
args = { '-' },
|
||||
stdin = true,
|
||||
args = {'-'},
|
||||
stdin = true
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -72,16 +72,12 @@ function M.run(argv)
|
||||
end
|
||||
end
|
||||
|
||||
local function get_all_tags()
|
||||
return vim.fn.systemlist('git tag')
|
||||
end
|
||||
|
||||
function M.complete(ArgLead, CmdLine, CursorPos)
|
||||
local str = string.sub(CmdLine, 1, CursorPos)
|
||||
if vim.regex([[^Git\s\+tag\s\+-\+$]]):match_str(str) then
|
||||
return table.concat({'--list', '-l', '-m', '-a', '-d'}, '\n')
|
||||
return table.concat({'--list'}, '\n')
|
||||
else
|
||||
return table.concat(get_all_tags(), '\n')
|
||||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -99,8 +99,7 @@ npm install --global prettier
|
||||
| `SPC l C` | Normal/Visual | 删除目录 |
|
||||
| `SPC l k` | Normal/Visual | 为光标下的单词或者选中文本增加 URL 链接 |
|
||||
| `SPC l K` | Normal/Visual | 为光标下的单词或者选中文本增加图片链接 |
|
||||
| `SPC l r` | Normal/Visual | 运行 Markdown 中当前代码块 |
|
||||
| `SPC l f` | Normal/Visual | 格式化 Markdown 中当前代码块 |
|
||||
| `SPC l r` | Normal/Visual | 运行区块中的代码 |
|
||||
| `SPC l u` | Normal/Visual | 更新目录 |
|
||||
| `SPC l p` | Normal | 通过浏览器实时预览当前文件 |
|
||||
| `SPC l t` | Normal | 切换待办事项状态 |
|
||||
|
@ -99,8 +99,7 @@ If you don't want to install php, you can use [mdctags](https://github.com/wsdje
|
||||
| `SPC l C` | Normal/Visual | Remove content |
|
||||
| `SPC l k` | Normal/Visual | Add URL link for word under cursor or slected word |
|
||||
| `SPC l K` | Normal/Visual | Add picture link for word under cursor or slected word |
|
||||
| `SPC l r` | Normal/Visual | Run code block |
|
||||
| `SPC l f` | Normal/Visual | Format code block |
|
||||
| `SPC l r` | Normal/Visual | Run code in block |
|
||||
| `SPC l u` | Normal/Visual | Update content |
|
||||
| `SPC l p` | Normal | Real-time markdown preview |
|
||||
| `SPC l t` | Normal | toggle todo status |
|
||||
|
Loading…
Reference in New Issue
Block a user