I have a question about tabs within vim and I'm using VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 17 2018 20:33:56) Included patches: 1-1255 Compiled by email@example.com
" This replaces :tabnew which I used to bind to this mapping nmap <leader>t :enew<cr> " " Move to the next buffer nmap <leader>l :bnext<CR> " " Move to the previous buffer nmap <leader>h :bprevious<CR> " " Close the current buffer and move to the previous one " This replicates the idea of closing a tab nmap <leader>bq :bp <BAR> bd #<CR> " " Show all open buffers and their status nmap <leader>bl :ls<CR>
The question I have is, is it possible to prevent the cursor from jumping to the beginning of the line? If I have two different files open and I'm half way on the line, when I switch to " file2" and back to "file", I'll be on the correct line, but at the beginning of the line. This causes me to use either w or w# to get back to where I was.
I don't seem to have this issue if I were to vs "file" and "file2".