mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
feat(defaults): map Y to y$ #13268
rationale: - consistent with D and Y - long recommended by Vim's own ":help Y" close #13268 close #416 ref #6289
This commit is contained in:
parent
aa07d06bf4
commit
5a111c1b02
@ -106,9 +106,10 @@
|
||||
clang-tools # for clangd to find the correct headers
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
shellHook = oa.shellHook + ''
|
||||
export NVIM_PYTHON_LOG_LEVEL=DEBUG
|
||||
export NVIM_LOG_FILE=/tmp/nvim.log
|
||||
export ASAN_SYMBOLIZER_PATH=${pkgs.llvm_11}/bin/llvm-symbolizer
|
||||
|
||||
# ASAN_OPTIONS=detect_leaks=1
|
||||
export ASAN_OPTIONS="log_path=./test.log:abort_on_error=1"
|
||||
@ -118,6 +119,10 @@
|
||||
# when running the functionaltests
|
||||
mkdir -p outputs/out/share/nvim/syntax
|
||||
touch outputs/out/share/nvim/syntax/syntax.vim
|
||||
|
||||
# for treesitter functionaltests
|
||||
mkdir -p runtime/parser
|
||||
cp -f ${pkgs.tree-sitter.builtGrammars.tree-sitter-c}/parser runtime/parser/c.so
|
||||
'';
|
||||
});
|
||||
});
|
||||
|
@ -986,9 +986,9 @@ inside of strings can change! Also see 'softtabstop' option. >
|
||||
|
||||
*Y*
|
||||
["x]Y yank [count] lines [into register x] (synonym for
|
||||
yy, |linewise|). If you like "Y" to work from the
|
||||
cursor to the end of line (which is more logical,
|
||||
but not Vi-compatible) use ":map Y y$".
|
||||
yy, |linewise|).
|
||||
*Y-default*
|
||||
Mapped to "y$" by default. |default-mappings|
|
||||
|
||||
*zy*
|
||||
["x]zy{motion} Yank {motion} text [into register x]. Only differs
|
||||
|
@ -72,6 +72,11 @@ the differences.
|
||||
|
||||
- |g:vimsyn_embed| defaults to "l" to enable Lua highlighting
|
||||
|
||||
|
||||
Default Mappings: *default-mappings*
|
||||
nnoremap Y y$
|
||||
xnoremap Y y$
|
||||
|
||||
==============================================================================
|
||||
3. New Features *nvim-features*
|
||||
|
||||
|
@ -314,6 +314,9 @@ int main(int argc, char **argv)
|
||||
init_highlight(true, false); // Default highlight groups.
|
||||
TIME_MSG("init highlight");
|
||||
|
||||
init_default_mappings(); // Default mappings.
|
||||
TIME_MSG("init default mappings");
|
||||
|
||||
// Set the break level after the terminal is initialized.
|
||||
debug_break_level = params.use_debug_break_level;
|
||||
|
||||
|
@ -397,6 +397,11 @@ void init_normal_cmds(void)
|
||||
nv_max_linear = i - 1;
|
||||
}
|
||||
|
||||
void init_default_mappings(void)
|
||||
{
|
||||
add_map((char_u *)"Y y$", NORMAL | VISUAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Search for a command in the commands table.
|
||||
* Returns -1 for invalid command.
|
||||
|
@ -21,6 +21,7 @@ set undodir^=.
|
||||
set wildoptions=
|
||||
set startofline
|
||||
set sessionoptions+=options
|
||||
unmap Y
|
||||
|
||||
" Prevent Nvim log from writing to stderr.
|
||||
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
|
||||
|
@ -1955,7 +1955,7 @@ func Test_autocmd_sigusr1()
|
||||
|
||||
let g:sigusr1_passed = 0
|
||||
au Signal SIGUSR1 let g:sigusr1_passed = 1
|
||||
call system('/bin/kill -s usr1 ' . getpid())
|
||||
call system('kill -s usr1 ' . getpid())
|
||||
call WaitForAssert({-> assert_true(g:sigusr1_passed)})
|
||||
|
||||
au! Signal
|
||||
|
@ -41,7 +41,8 @@ module.nvim_set = (
|
||||
..' belloff= wildoptions-=pum noshowcmd noruler nomore redrawdebug=invalid')
|
||||
module.nvim_argv = {
|
||||
module.nvim_prog, '-u', 'NONE', '-i', 'NONE',
|
||||
'--cmd', module.nvim_set, '--embed'}
|
||||
'--cmd', module.nvim_set,
|
||||
'--cmd', 'unmap Y', '--embed'}
|
||||
-- Directory containing nvim.
|
||||
module.nvim_dir = module.nvim_prog:gsub("[/\\][^/\\]+$", "")
|
||||
if module.nvim_dir == module.nvim_prog then
|
||||
|
Loading…
Reference in New Issue
Block a user