If I am using visual block mode to append to a block of text and number of characters exceeds 80, then the line snaps and text is not appended to rest of the block. I want to find a way such that line does not wrap around in visual mode,but when I am done with appending text, lines should automatically wrap after 80 characters.
Edit: I initially misunderstood this to be a problem with pasting; actually, you mean appending from visual mode. The following mapping should handle that, by temporarily resetting
'formatoptions' until you're done inserting:
:xnoremap A <Esc>:let save_fo = &fo<Bar>setl fo=<Bar>augroup TempInsert<Bar>augroup END<Bar>autocmd! TempInsert InsertLeave * let &fo = save_fo<Bar>autocmd! TempInsert<CR>gvA
I only see this effect with auto-formatting, i.e.
If you don't want this when pasting, you could override the command, or provide a special alternative, like this:
:nnoremap <Leader>p :let save_fo = &fo<Bar>setl fo-=a<Bar>execute 'normal! "' . v:register . 'p'<Bar>let &fo = save_fo<CR>