Closed nguxx closed 4 years ago
Hello @nguxx 👋
⚠️ Do you realize your question has nothing to do with tmux?
That being said, you may want to try this in your ~/.vimrc
:
" inverts paste mode
nnoremap <silent> <leader>pp :set paste! paste?<CR>
" same in insert mode
set pastetoggle=<leader>pp
If you want to paste with CTRL + V
(or COMMAND + V
on macOS) while in insert mode, you need to enable paste mode before doing so.
Another option is to use e.g. <leader> + p
to paste from the OS clipboard while being in command mode:
" yank/paste to/from the OS clipboard
map <silent> <leader>y "+y
map <silent> <leader>Y "+Y
map <silent> <leader>p "+p
map <silent> <leader>P "+P
If these suggestions don't help, please look for Vim support, e.g. in the #vim
IRC channel on Freenode.
warning Do you realize your question has nothing to do with tmux?
Stricly speaking you right. But this behavior only appends when the cut comes from tmux so I asked myself if there were a way to treat it in .tmux.config. it seems not, you would know. Thanks for the tips even if I cannot make them work. I'm keeping on sneaking around...
Hello, When I'm pasting I get this indent alignement in vim it dues to the config
set smartindent
but hard not to usesmartindent
in vim... Would you know a trick to get a nice pasting in tmux ANDsmartindent
set in vim ? This is how it comes