0

When I press 0 in Normal mode, the cursor goes to the second column and not the first one. This is not the normal behavior stated in vim's :help 0.

I have tried disabling the remaps to move between wrapped lines from my config (below) and the behavior is the same. Is there any way to change this? Maybe a package it's interfering with the regular behavior but I cannot see which one.

Here is my .vimrc config file

set backspace=indent,eol,start " backspace over everything in insert mode
set nocompatible               " be improved, required
filetype off                   " required

" vim-plug manager
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')

Plug 'lervag/vimtex'
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=0
set conceallevel=1
let g:tex_conceal='abdmg'

Plug 'sirver/ultisnips'
let g:UltiSnipsExpandTrigger = '<tab>'
let g:UltiSnipsJumpForwardTrigger = '<tab>'
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'

Plug 'itchyny/lightline.vim'

Plug 'sainnhe/gruvbox-material'

Plug 'scrooloose/nerdcommenter'

" List ends here. Plugins become visible to Vim after this call.
call plug#end()


syntax enable
"colorscheme monokai
set number
set ts=4
set expandtab
set autoindent
set wildmenu
set showmatch
set showmatch
set incsearch
set nohlsearch
set linebreak
set ttimeoutlen=0
set laststatus=2
set noshowmode
" Lets you edit another file without saving the current
set hidden

" GUI enhancements
" Set nice colors for 256 terminal
if !has('gui_running')
  set t_Co=256
endif
" Set the airline colorscheme
let g:lightline = {'colorscheme' : 'gruvbox_material'}
" Set colorscheme
set termguicolors
set background=dark
let g:gruvbox_material_background = 'medium'
colorscheme gruvbox-material

" REMAPS
" Inserting a real Tab when pressing Shift + Tab
:inoremap <S-Tab> <C-V>Tab>
" Move between wrapped lines
noremap <silent> k gk
noremap <silent> j gj
noremap <silent> 0 g0 
noremap <silent> $ g$
2
  • 3
    Try disabling your .vimrc by running vim -u NONE. If that changes the behavior, make a copy of your .vimrc and remove things until the problem goes away. BTW, there's a Stack Exchange site just for vi/vim: Vi and Vim. Nov 19, 2019 at 22:53
  • For reference, here is the crosspost to vi.se
    – statox
    Nov 21, 2019 at 15:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.