Commits

Gabriel AHTUNE committed 7e8c127

Fix a small bug when the line is not commented nor indented

  • Participants
  • Parent commits d6ffea5

Comments (0)

Files changed (1)

File plugin/supernormal.vim

 
 if !exists("g:SuperNormalDeactivateHomeMapping")
     function! GotoFirstWord()
-        let save_search = @/
-        norm! 0
-        let @/='\w'
-        norm! n
-        exec "nohl"
-        let @/ = save_search
+        if strpart(getline('.'), 0, 1) =~ '^\w$'
+            norm! 0
+        else
+            let save_search = @/
+            norm! 0
+            let @/='\w'
+            norm! n
+            exec "nohl"
+            let @/ = save_search
+        endif
     endfunction
 
     function! SuperHome()