lists.vim icon indicating copy to clipboard operation
lists.vim copied to clipboard

Opening new line from list causes unwanted indent

Open RhvdG opened this issue 2 years ago • 31 comments

When in a list, in normal mode, hitting o causes the new line to be opened, but with the cursor indented irregularly. See image.

image

RhvdG avatar Jul 22 '22 12:07 RhvdG

I believe this is due to your own configuration or some plugin. Can you provide a minimal example? Something like this:

test.vim

set nocompatible

set runtimepath^=~/.local/plugged/lists.vim
set noswapfile
set nomore

runtime plugin/lists.vim

silent edit list.txt
ListsEnable

list.md

# List

* First entry. Long line
  that spans two lines.
  * Depth two 1 also a long
    line.
  * Depth two 2 short line
    * Depth three 0
    * Depth three 1 with long line here.
      spans three
      lines.
    * Depth three 2 and 2
      lines
  * Depth two 3
    2 lines
* Second entry
  also two lines
  * Depth two 1 single line
  * Depth two 2
    three lines

* A
  * Aa
  * Ab
    * Ab1
      * Ab1i

Open with nvim --clean -u test.vim (neovim) or vim -u test.vim (Vim). Now check if you still have the problem. If you don't, then this is likely to be a problem caused by your configuration or a plugin.

lervag avatar Jul 24 '22 21:07 lervag

Excuse my ineptitude when it comes to code: I have no idea how to do what you are asking in MacVim (which is how I do Vim).

RhvdG avatar Jul 25 '22 10:07 RhvdG

Hmm, ok. Are you familiar with terminals; can you open a terminal and run commands in them?

In the meantime, another way to do minimal setups is to make a copy of your vimrc file and then create a termporary vimrc file with minimal settings:

  1. Copy your current vimrc for safekeeping.

  2. Edit your vimrc file and add a minimal setup similar to the one I posted above. If you use vim-plug to install plugins, this should also work:

    call plug#begin()
    Plug 'lervag/lists.vim'
    call plug#end()
    

    Please adapt this; the point is to apply only the necessary configuration to reproduce the problem described in the issue.

  3. Now open MacVim as you normally do, it should open with the minimal settings. Edit some simple lists.txt file or something similar, and enable lists.vim with ListsEnable.

  4. Is the problem still there?

lervag avatar Jul 26 '22 11:07 lervag

The most relevant option for the behaviour of o is :help 'formatoptions'. The behaviour is also affected by other things, such as indentation settings. Notice that these are not really something lists.vim change, so the problem is essentially not a problem with lists.vim. But I'll try to help you figure out what's going on.

Which filetype are you working on when you see this issue (check with :set filetype). Also, can you show me your current vimrc?

lervag avatar Jul 26 '22 11:07 lervag

The most relevant option for the behaviour of o is :help 'formatoptions'. The behaviour is also affected by other things, such as indentation settings. Notice that these are not really something lists.vim change, so the problem is essentially not a problem with lists.vim. But I'll try to help you figure out what's going on.

Which filetype are you working on when you see this issue (check with :set filetype). Also, can you show me your current vimrc?

Thanks for your patience. I'll answer this one first, perhaps the exercise with the minimal settings you outlined earlier won't be needed.

Filetype = markdown

Here's my .vimrc, with a few abbreviations, hostnames and paths removed for security reasons.

set nocompatible
filetype plugin indent on

augroup textobj_sentence
  autocmd!
  autocmd FileType markdown call textobj#sentence#init()
  autocmd FileType text call textobj#sentence#init()
augroup END

set conceallevel=2

syntax on
colorscheme apprentice

set guicursor=i:block-iCursor
set guicursor+=n-i-v:blinkon0
set guioptions=

set ignorecase
set smartcase
set scrolloff=3

autocmd FileType text setlocal tabstop=16

let g:vim_markdown_folding_disabled = 0
let g:vim_markdown_folding_level = 6
let g:vim_markdown_strikethrough = 1

set backspace=indent,eol,start

set nobackup		" do not keep a backup file, use versions instead
set noswapfile

set history=50		" keep 50 lines of command line history
set ruler		" show the cursor position all the time
set showcmd		" display incomplete commands
set incsearch		" do incremental searching
set noshowmode
set cmdheight=1
set linespace=4
set clipboard=unnamed

call plug#begin('~/.vim/plugged')
Plug 'romainl/vim-cool'
Plug 'jremmen/vim-ripgrep'
Plug 'kana/vim-textobj-user'
Plug 'preservim/vim-textobj-sentence'
Plug 'ron89/thesaurus_query.vim'
Plug 'preservim/vim-markdown'
Plug 'tpope/vim-commentary'
Plug 'tommcdo/vim-exchange'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-obsession'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-eunuch'
Plug 'unblevable/quick-scope'
Plug 'svermeulen/vim-subversive'
Plug 'tpope/vim-repeat'
Plug 'svermeulen/vim-yoink'
Plug 'svermeulen/vim-cutlass'
Plug 'lervag/wiki.vim'
Plug 'lervag/lists.vim'
call plug#end()

let g:wiki_root = '~/xxxxxxxx/vimwiki'
let g:wiki_filetypes = ['md']
let g:wiki_link_extension = '.md'
let g:wiki_link_target_type = 'md'

let g:wiki_map_create_page = 'WikiCreatePage'
function WikiCreatePage(text) abort
  return substitute(tolower(a:text), '\s\+', '_', 'g')
endfunction

let g:wiki_map_text_to_link = 'MyTextToLink'
    function MyTextToLink(text) abort
      return [substitute(tolower(a:text), '\s\+', '_', 'g'), a:text]
    endfunction

let g:wiki_mappings_local_journal = {
          \ '<plug>(wiki-journal-prev)' : '[j',
          \ '<plug>(wiki-journal-next)' : ']j',
          \}
let g:wiki_fzf_pages_opts = '--preview "cat {1}"'
let g:wiki_write_on_nav = 1

nmap <leader>wi <plug>(wiki-journal-index)
nmap <leader>fw <plug>(wiki-fzf-pages)
let g:wiki_fzf_pages_force_create_key = 'ctrl-v'
nmap <leader>wb <plug>(wiki-graph-find-backlinks) 
nmap <leader>wv <plug>(wiki-link-follow-vsplit)

inoremap <C-Space> <C-x><C-o>

let g:lists_filetypes = ['markdown', 'md']
let g:lists_todos = ['_TODO_', '_DONE_']

let g:fzf_action = {
  \ 'ctrl-t': 'tab split',
  \ 'ctrl-x': 'split',
  \ 'ctrl-v': 'vsplit',
  \ 'ctrl-y': {lines -> setreg('*', join(lines, "\n"))}}

set foldmethod=expr


let g:netrw_liststyle = 3
let g:netrw_browse_split = 0
let g:netrw_altv=1
let g:netrw_banner = 0
let g:netrw_winsize = 30
let g:netrw_bufsettings = "noma nomod nu nobl nowrap ro rnu"

nnoremap <leader>th :ThesaurusQueryReplaceCurrentWord<CR>
let g:tq_enabled_backends=["openoffice_en","datamuse_com"]
let g:tq_openoffice_en_file="~/xxxxxxxx/MyThes-1.0/th_en_US_new"


inoremap <silent> <S-TAB> <esc>cas
inoremap <s-left> <esc>lcl

nmap s <plug>(SubversiveSubstitute)
nnoremap gm m
nmap <c-n> <plug>(YoinkPostPasteSwapBack)
nmap <c-p> <plug>(YoinkPostPasteSwapForward)
nmap p <plug>(YoinkPaste_p)
nmap P <plug>(YoinkPaste_P)
let g:yoinkIncludeDeleteOperations=1
nnoremap m d
xnoremap m d
nnoremap mm dd

let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']


nnoremap z` zMzv
nnoremap Q vipgq

nnoremap <leader>tr :Texplore<CR>

nnoremap <leader>r :Rg<space>

nnoremap <C-h> <C-w>h
nnoremap <C-l> <C-w>l
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k

map <Plug> <Plug>Markdown_EditUrlUnderCursor

nnoremap <leader>pda :!pandoc -V lang=nl -V papersize:a4 titel.md -o titel.pdf --template latekiss --top-level-division chapter
nnoremap <leader>pdb :!pandoc -V lang=en-GB -V papersize:a4 titel.md -o titel.pdf --template latekiss --top-level-division chapter -V numbersections

set nu rnu
set ch=1

if hostname() ==# 'xxxxxxxx'
	set numberwidth=7
elseif hostname() ==# 'xxxxxxxx'
	set numberwidth=7
else
	set numberwidth=20
endif

set complete=.,w,b,u,kspell
set autoread
set autoindent
set wildmenu

iabbrev teh the


nmap <leader>s ysiw

nmap <leader>a }kA

nmap <leader>d :colo apprentice<CR>
nmap <leader>l :colo iawriter<CR>

nmap <leader>en :setlocal spelllang=en spell<CR>
nmap <leader>nl :setlocal spelllang=nl spell<CR>

nnoremap <Up> <c-b>
nnoremap <Down> <c-f>

nmap <leader>sw :setlocal tw=0 linebreak<bar>%s/\n\n/§§§/g<bar>%join<bar>:%s/§§§/\r\r/g<CR>

nmap <leader>hw :setlocal tw=60 nolinebreak<bar>norm ggVGgq<CR>

nmap <leader>ws :%s/\s\+$//

:map gf :e <cfile><CR>

inoremap . .<C-g>u
inoremap ! !<C-g>u
inoremap ? ?<C-g>u
inoremap : :<C-g>u

nnoremap <leader>rm :call delete(expand('%')) \| bdelete!

set textwidth=60

set breakindent

set nolist
set display=lastline
set nospell

set undofile
set undodir=~/xxxxxxxx/undodir

if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

if has('gui_running') && has('gui_macvim')
        set fullscreen
    endif

autocmd CursorHold * update

autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal g`\"" |
    \ endif

cd ~/xxxxxxxx

if !exists('g:lasttab')
  let g:lasttab = 1
endif
nmap <Leader>tt :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()

au BufRead index.md normal zR

Tried outcommenting set breakindent and set autoindent, but the fault remains.

RhvdG avatar Jul 26 '22 16:07 RhvdG

First, I took the liberty of removing all comments from the pasted vimrc - they don't matter to me or to this issue.

Next, here is an equivalent version, somewhat cleaned up. I've added comments like "NOTE: ..." where I have a particular comment. I did this mostly to faster understand your vimrc file, and you are of course free to keep your current version.

call plug#begin('~/.vim/plugged')
Plug 'romainl/vim-cool'
Plug 'jremmen/vim-ripgrep'
Plug 'kana/vim-textobj-user'
Plug 'preservim/vim-textobj-sentence'
Plug 'ron89/thesaurus_query.vim'
Plug 'preservim/vim-markdown'
Plug 'tpope/vim-commentary'
Plug 'tommcdo/vim-exchange'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-obsession'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-eunuch'
Plug 'unblevable/quick-scope'
Plug 'svermeulen/vim-subversive'
Plug 'tpope/vim-repeat'
Plug 'svermeulen/vim-yoink'
Plug 'svermeulen/vim-cutlass'
Plug 'lervag/wiki.vim'
Plug 'lervag/lists.vim'
call plug#end()
" NOTE: plug#end will do the filetype plugin indent on and syntax on!

" Autocommands in vimrc should be kept in an augroup
augroup vimrc
  autocmd!
  autocmd FileType markdown call textobj#sentence#init()
  autocmd FileType text call textobj#sentence#init()
  autocmd FileType text setlocal tabstop=16
  autocmd CursorHold * update
  autocmd BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$") |
      \   exe "normal g`\"" |
      \ endif
  au TabLeave * let g:lasttab = tabpagenr()
  au BufRead index.md normal zR
augroup END

" Options
colorscheme apprentice

set conceallevel=2

set guicursor=i:block-iCursor
set guicursor+=n-i-v:blinkon0
set guioptions=

set ignorecase
set smartcase
set scrolloff=3

set backspace=indent,eol,start

set nobackup
set noswapfile

set history=50
set ruler
set showcmd
set incsearch
set noshowmode
set cmdheight=1
set linespace=4
set clipboard=unnamed

" NOTE: This option is not useful in vimrc unless you also specify
"   set foldexpr=EXPR. I suggest you remove it.
"set foldmethod=expr

set number
set relativenumber

if hostname() ==# 'xxxxxxxx'
  set numberwidth=7
elseif hostname() ==# 'xxxxxxxx'
  set numberwidth=7
else
  set numberwidth=20
endif

set complete=.,w,b,u,kspell
set autoread
set autoindent
set wildmenu

" NOTE: Minor comment - 60 seems like an unconventional default?
set textwidth=60

set breakindent

set nolist
set display=lastline
set nospell

set undofile
set undodir=~/xxxxxxxx/undodir

if &t_Co > 2 || has("gui_running")
  set hlsearch
endif

if has('gui_running') && has('gui_macvim')
  set fullscreen
endif

" Mappings and abbreviations
inoremap <C-Space> <C-x><C-o>

iabbrev teh the

nmap <leader>s ysiw

nmap <leader>a }kA

nmap <leader>d :colo apprentice<CR>
nmap <leader>l :colo iawriter<CR>

nmap <leader>en :setlocal spelllang=en spell<CR>
nmap <leader>nl :setlocal spelllang=nl spell<CR>

nnoremap <Up> <c-b>
nnoremap <Down> <c-f>

nnoremap z` zMzv
nnoremap Q vipgq

nnoremap <C-h> <C-w>h
nnoremap <C-l> <C-w>l
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k

nnoremap <leader>pda :!pandoc -V lang=nl -V papersize:a4 titel.md -o titel.pdf --template latekiss --top-level-division chapter
nnoremap <leader>pdb :!pandoc -V lang=en-GB -V papersize:a4 titel.md -o titel.pdf --template latekiss --top-level-division chapter -V numbersections

nmap <leader>sw :setlocal tw=0 linebreak<bar>%s/\n\n/§§§/g<bar>%join<bar>:%s/§§§/\r\r/g<CR>

nmap <leader>hw :setlocal tw=60 nolinebreak<bar>norm ggVGgq<CR>

nmap <leader>ws :%s/\s\+$//

map gf :e <cfile><CR>

inoremap . .<C-g>u
inoremap ! !<C-g>u
inoremap ? ?<C-g>u
inoremap : :<C-g>u

nnoremap <leader>rm :call delete(expand('%')) \| bdelete!

" Plugin configuration
let g:vim_markdown_folding_disabled = 0
let g:vim_markdown_folding_level = 6
let g:vim_markdown_strikethrough = 1

let g:wiki_root = '~/Dropbox/Schrijven/vimwiki'
let g:wiki_filetypes = ['md']
let g:wiki_link_extension = '.md'
let g:wiki_link_target_type = 'md'
let g:wiki_map_create_page = 'WikiCreatePage'
let g:wiki_map_text_to_link = 'MyTextToLink'
let g:wiki_mappings_local_journal = {
          \ '<plug>(wiki-journal-prev)' : '[j',
          \ '<plug>(wiki-journal-next)' : ']j',
          \}
let g:wiki_fzf_pages_opts = '--preview "cat {1}"'
let g:wiki_fzf_pages_force_create_key = 'ctrl-v'
let g:wiki_write_on_nav = 1

function WikiCreatePage(text) abort
  return substitute(tolower(a:text), '\s\+', '_', 'g')
endfunction

function MyTextToLink(text) abort
  return [substitute(tolower(a:text), '\s\+', '_', 'g'), a:text]
endfunction

nmap <leader>wi <plug>(wiki-journal-index)
nmap <leader>fw <plug>(wiki-fzf-pages)
nmap <leader>wb <plug>(wiki-graph-find-backlinks)
nmap <leader>wv <plug>(wiki-link-follow-vsplit)

let g:lists_filetypes = ['markdown', 'md']
let g:lists_todos = ['_TODO_', '_DONE_']

let g:fzf_action = {
  \ 'ctrl-t': 'tab split',
  \ 'ctrl-x': 'split',
  \ 'ctrl-v': 'vsplit',
  \ 'ctrl-y': {lines -> setreg('*', join(lines, "\n"))}}

let g:netrw_liststyle = 3
let g:netrw_browse_split = 0
let g:netrw_altv=1
let g:netrw_banner = 0
let g:netrw_winsize = 30
let g:netrw_bufsettings = "noma nomod nu nobl nowrap ro rnu"

let g:tq_enabled_backends=["openoffice_en","datamuse_com"]
let g:tq_openoffice_en_file="~/xxxxxxxx/MyThes-1.0/th_en_US_new"

nnoremap <leader>th :ThesaurusQueryReplaceCurrentWord<CR>

inoremap <silent> <S-TAB> <esc>cas
inoremap <s-left> <esc>lcl

let g:yoinkIncludeDeleteOperations=1

nmap s <plug>(SubversiveSubstitute)
nnoremap gm m
nmap <c-n> <plug>(YoinkPostPasteSwapBack)
nmap <c-p> <plug>(YoinkPostPasteSwapForward)
nmap p <plug>(YoinkPaste_p)
nmap P <plug>(YoinkPaste_P)
nnoremap m d
xnoremap m d
nnoremap mm dd

let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']

if !exists('g:lasttab')
  let g:lasttab = 1
endif
nmap <Leader>tt :exe "tabn ".g:lasttab<CR>

nnoremap <leader>tr :Texplore<CR>

nnoremap <leader>r :Rg<space>

map <Plug> <Plug>Markdown_EditUrlUnderCursor

" Execute desired commands
cd ~/xxxxxxxx

Now, before we continue, can you be specific about which behaviour you expect after o in a list line?

lervag avatar Jul 26 '22 18:07 lervag

Thanks a lot, my .vimrc looks much better :-) However, the 'unwanted indent' remains.

Now, before we continue, can you be specific about which behaviour you expect after o in a list line?

I would expect a new line to be opened continuing the list. So

  1. List item
  2. List item|

In normal mode, with the cursor somewhere in the second list item line, this should result:

  1. |

Perhaps this is because I remember bullets.vim did that (but I had lots of other trouble with it).

RhvdG avatar Jul 27 '22 16:07 RhvdG

I also noted that numbered lists are not continued. I'd write

  1. Test

... and hit return, and expect

... but instead I get just an empty new line.

The plugin is active (cntrl-s toggles a [ ] checkbox).

RhvdG avatar Jul 27 '22 17:07 RhvdG

Thanks, those are good explanations.

bullets.vim remaps both <cr> and o to achieve this behaviour. lists.vim tries to avoid this and instead rely on built-in mechanisms.

I'll look into it, in any case.

lervag avatar Jul 28 '22 11:07 lervag

I've looked into this. First, and most important: Not everyone wants this behaviour (myself included). I sometimes write text with hard wrapping, where I want both o and <cr> to just start a new line properly indented with the current bullet point/number.

The Vim options comments and formatoptions can be used to change the behaviour of both <cr> and o, and lists.vim currently does rely on comments to affect how things like gq work on lists. I'm also adding a minor change to formatoptions to make it slightly more "as expected", but it does not currently resolve your issue.

Notice that the :ListsToggle (mapped to <c-s> by default) is closer to what you want right now. If you hit <cr>, then <c-s>, it should add the bullet or number. If we can focus on this first and make it work as expected, then it could be possible to at least create a <plug> mapping that people can use optionally for o and <cr>.

So, first: Can you verify that <c-s> works as expected for you after <cr> and o opens a new line (regardless of indents)?

lervag avatar Jul 28 '22 12:07 lervag

Both in MacVim and Terminal, control-s after <cr> and o causes the cursor to jump to the command line, adding unexpected hidden characters in MacVim (see screen capture). I can make a screen recording if it helps.

RhvdG avatar Jul 28 '22 15:07 RhvdG

There's no screen capture..? Whats the output of :verbose map <c-s> (literally, as in four characers: "")?

lervag avatar Jul 28 '22 16:07 lervag

n <C-S> @<Plug>(lists-toggle) Last set from ~/xxxxxxxx/plugged/lists.vim/autoload/lists.vim line 69

https://user-images.githubusercontent.com/34862159/181590337-836887c3-1efb-4fde-b0f9-f7f6440e8d6f.mov

RhvdG avatar Jul 28 '22 16:07 RhvdG

The mapping listed is the normal mode map. I should have asked for :imap <c-s> - does it give a similar output?

lervag avatar Jul 28 '22 21:07 lervag

Now we are getting there.

i <C-S> <Plug>Isurround

RhvdG avatar Jul 28 '22 22:07 RhvdG

Precisely; can you (for the context of this issue) disable the plugin that adds that mapping?

lervag avatar Jul 29 '22 08:07 lervag

And then repeat what I asked for previously.

lervag avatar Jul 29 '22 08:07 lervag

Disabling tpope's Surround plugin causes <c-s> after <cr> to continue the list as intended, both in normal (hitting o instead of <cr>)and in insert mode. It would be a pity to lose the Surround plugin functionality, though...

RhvdG avatar Jul 29 '22 19:07 RhvdG

Do you want to investigate this further? The surround plugin is quite popular, I think, so it might be worth the effort. Let me know if I can help.

RhvdG avatar Aug 03 '22 06:08 RhvdG

Do you want to investigate this further? The surround plugin is quite popular, I think, so it might be worth the effort. Let me know if I can help.

Sorry, I've been busy, so I have not had time to follow up yet.

It would be a pity to lose the Surround plugin functionality, though...

Of course, you won't. Don't worry. I just want us to be on the same page about things before I make updates/changes/suggestions.

Disabling tpope's Surround plugin causes <c-s> after <cr> to continue the list as intended, both in normal (hitting o instead of <cr>) and in insert mode.

Ok. So, does this mean that you can live with the lists.vim behaviour of <c-s> as a "resolution" here? This is how I do things personally, and it gives me the option to easily add newlines within lists and then adding new list bullets/numbers with <c-s> when I want them.

If so, then the last part is to handle the conflict with surround.vim; this is not hard. But before I explain that I want feedback on my previous question.

lervag avatar Aug 03 '22 20:08 lervag

Thanks for your continued efforts! Yes, I could certainly live with that behaviour.

RhvdG avatar Aug 04 '22 08:08 RhvdG

Great. :)

So, what you want is to have the functionality of <c-s> from both lists.vim and from surround.vim. But you can't have both of these mapped to <c-s>. To resolve this, you want to remap for one of the plugins. I don't know how to do it for surround.vim, so this is how to remap for lists.vim:

let g:lists_maps_default_override = {
      \ 'i_<plug>(lists-toggle)': '<c-t>',
      \}

See :help g:lists_maps_default_override for more info on this.

PS! This is a new feature, so you must update the plugin first.

lervag avatar Aug 04 '22 11:08 lervag

Let me know if this works for you as expected and if it is sufficient to resolve the issue.

lervag avatar Aug 04 '22 11:08 lervag

Thanks. It works, but...

  1. Lists with dashes auto-continue without the <c-t>, which is inconsistent and means they can't be ended (going forward with normal newlines) by just hitting return. Numbered lists don't auto-continue and do need the <c-t>.
  2. <c-t> is normally bound to 'indent list item' in insert mode, so to preserve that, I changed the lists shortcut to <c-l>.
  3. Lists with items starting - [ ] auto-continue with just the dash, and the new shortcut doesn't provide the missing [ ].

RhvdG avatar Aug 04 '22 12:08 RhvdG

Thanks for the update!

I believe I need to do some changes and improvements here. I originally had <c-s> for toggling lists (normal mode), and added <c-s> in insert mode for the similar thing, except also to add missing number/dash/etc. But I believe it would be better to change.

The current docs say:

*:ListsToggle*
*<plug>(lists-toggle)*
  Toggle a list item. The mapping works in both normal and insert mode.

But I think this is better:

*:ListsToggle*
*<plug>(lists-toggle)*
  Toggle a list items "status". For checkboxes, this means to toggle the
  checkmark on/off. Elsewhere, we toggle between statuses defined in
  |g:lists_todos|.

*i_<plug>(lists-new-element)*
  An insert mode mapping to add a new element in the current list. This is
  useful after creating a new line below a list element to add the
  bullet/dash/number in front, possibly with a checkbox if relevant.

What do you think?

lervag avatar Aug 04 '22 13:08 lervag

Sounds very good!

RhvdG avatar Aug 04 '22 13:08 RhvdG

Ok, I've updated now. Please read the updated docs and test. I think, if nothing else, it is closer to decent now.

lervag avatar Aug 17 '22 17:08 lervag

Hi. Lists with dashes still auto-continue without the (new) shortcut. And continuing a numbered list using the shortcut triggers the audible alert.

RhvdG avatar Aug 18 '22 10:08 RhvdG

What's your formatoptions and comments settings? I.e., what's the ouptut of :set formatoptions and :set comments?

lervag avatar Aug 18 '22 10:08 lervag

What's your formatoptions and comments settings? I.e., what's the ouptut of :set formatoptions and :set comments?

image image

RhvdG avatar Aug 18 '22 11:08 RhvdG