These mappings are working great.
Now I would like to combine them.

" Jump to start of nth or next block of 16 lines
nnoremap <expr> ]]
  \ v:count
  \ ? ":<C-U><cr>".(v:count*16+1)."Gzz"
  \ : 17-line(".")%16."jzz"

" Display line and block number
nnoremap ][ :echo (line(".")-1)%16 line(".")/16 "List"<cr>

BUT this function is not working:

fu! List()
" Jump to start of nth or next block of 16 lines
  v:count ? ":<C-U><cr>".(v:count*16+1)."Gzz" : 17-line(".")%16."jzz"
" Display line and block number
  echo (line(".")-1)%16 line(".")/16 "List"<cr>
endfu
nnoremap ]] :call List()<cr>

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to