Code Monkey home page Code Monkey logo

Comments (4)

0xgrm avatar 0xgrm commented on June 1, 2024
  • indent list item when pressing Tab key in insert mode
  • add the possibility to use different list item characters based on the indentation level (ex: '*' for level 1, '-' for level 2)

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

@uryupinsk 👍

from vim-pandoc.

Konfekt avatar Konfekt commented on June 1, 2024

Here are some suggestions:

Section Jumping:

" section jumping
nnoremap <buffer><silent> ]] :<c-u>call <SID>TexJump2Section( v:count1, '' , 0)<CR>
nnoremap <buffer><silent> [[ :<c-u>call <SID>TexJump2Section( v:count1, 'b', 0)<CR>
xnoremap <buffer><silent> ]] :<c-u>call <SID>TexJump2Section( v:count1, '' , 1)<CR>
xnoremap <buffer><silent> [[ :<c-u>call <SID>TexJump2Section( v:count1, 'b', 1)<CR>
onoremap <buffer><silent> ]] :<c-u>normal ]]<CR>
onoremap <buffer><silent> [[ :<c-u>normal [[<CR>

function! s:TexJump2Section( cnt, dir, vis )
  if a:vis
    normal! gv
  endif

  let i = 0
  let pattern = '\v^#{1,6}.*$|^.+\n%(\-+|\=+)$'
  let flags = 'W' . a:dir
  while i < a:cnt && search( pattern, flags ) > 0
    let i = i+1
  endwhile
endfunction

LaTeX environments:

" From https://github.com/gibiansky/vim-latex-objects/blob/da66a67199c7c55f582b8720e4b06819c78f6478/plugin/vim-latex-objects.vim

function! <sid>NextEnd()
    let curline = line(".") + 1
    let begins = 1
    while begins > 0
        if getline(curline) =~ '.*\\begin.*$'
            let begins += 1
        endif
        if getline(curline) =~ '.*\\end.*$'
            let begins -= 1
        endif

        let curline += 1
    endwhile

    return curline - 1
endfunction

function! <sid>PrevBegin()
    let curline = line(".")
    let ends = 1
    while ends > 0
        if getline(curline) =~ '.*\\begin.*$'
            let ends -= 1
        endif
        if getline(curline) =~ '.*\\end.*$'
            let ends += 1
        endif

        let curline -= 1
    endwhile

    return curline + 1
endfunction

function! <sid>SelectInEnvironment(surround)
    let start = <sid>PrevBegin()
    let end = <sid>NextEnd()

    call cursor(start, 0)
    if !a:surround
        normal! j
    end
    normal! V
    call cursor(end, 0)
    if !a:surround
        normal! k
    end
endfunction

" Operate on environments (that have begin and ends on separate lines)
xnoremap <buffer><silent> ie <ESC>:call <sid>SelectInEnvironment(0)<CR>
xnoremap <buffer><silent> ae <ESC>:call <sid>SelectInEnvironment(1)<CR>

nnoremap <buffer> <SID>(V) V
onoremap <buffer> ie :execute "keepjumps normal \<SID>(V)ie"<CR>
onoremap <buffer> ae :execute "keepjumps normal \<SID>(V)ae"<CR>

from vim-pandoc.

starsareintherose avatar starsareintherose commented on June 1, 2024

Could the bib reference list show in a separate window, such as NERDTree or Tagbar?

from vim-pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.