New answers tagged cut-copy-paste
0
votes
Accepted
Indentation is messed up when pasting code
Found myself implementing the code.
It first pastes then fixes the indentation correctly as far as I could see.
function! PasteFormat(x)
let l=@+
let l=len(split(l,"\n"))-1
...
2
votes
Accepted
Is it possible to keep folds saved when I copy from one file to another?
Probably :set[local] foldmethod=marker is the most portable in that it actually denotes folds in the file using special (and customizable) markers. Even programs other than vim can be told (or taught) ...
Top 50 recent answers are included
Related Tags
cut-copy-paste × 371register × 39
os-clipboard × 31
visual-mode × 27
key-bindings × 23
vimrc × 18
cursor-motions × 18
visual-block × 14
neovim × 13
normal-mode × 13
vimscript × 12
replace × 11
cursor-movement × 10
search × 9
indentation × 9
insert-mode × 9
command-line × 8
gvim × 8
terminal × 8
linux × 7
repeated-commands × 7
paste × 7
tmux × 6
substitute × 5
macos × 5