44" Email: karl.yngve@gmail.com
55"
66
7- function ! vimtex#view#init_buffer () abort " {{{1
7+ function ! vimtex#view#init_buffer () abort
88 if ! g: vimtex_view_enabled | return | endif
99
1010 command ! - buffer -nargs =? -complete =file VimtexView
@@ -17,8 +17,7 @@ function! vimtex#view#init_buffer() abort " {{{1
1717 endif
1818endfunction
1919
20- " }}}1
21- function ! vimtex#view#init_state (state ) abort " {{{1
20+ function ! vimtex#view#init_state (state ) abort
2221 if ! g: vimtex_view_enabled | return | endif
2322 if has_key (a: state , ' viewer' ) | return | endif
2423
@@ -38,16 +37,14 @@ function! vimtex#view#init_state(state) abort " {{{1
3837 endtry
3938endfunction
4039
41- " }}}1
4240
43- function ! vimtex#view#view (... ) abort " {{{1
41+ function ! vimtex#view#view (... ) abort
4442 if exists (' *b:vimtex.viewer.view' )
4543 call b: vimtex .viewer.view (a: 0 > 0 ? a: 1 : ' ' )
4644 endif
4745endfunction
4846
49- " }}}1
50- function ! vimtex#view#compiler_callback () abort " {{{1
47+ function ! vimtex#view#compiler_callback () abort
5148 if exists (' *b:vimtex.viewer.compiler_callback' )
5249 if ! b: vimtex .viewer.check () | return | endif
5350
@@ -58,16 +55,14 @@ function! vimtex#view#compiler_callback() abort " {{{1
5855 endif
5956endfunction
6057
61- " }}}1
62- function ! vimtex#view#compiler_stopped () abort " {{{1
58+ function ! vimtex#view#compiler_stopped () abort
6359 if exists (' *b:vimtex.viewer.compiler_stopped' )
6460 call b: vimtex .viewer.compiler_stopped ()
6561 endif
6662endfunction
6763
68- " }}}1
6964
70- function ! vimtex#view#inverse_search (line , filename, column = 0 ) abort " {{{1
65+ function ! vimtex#view#inverse_search (line , filename, column = 0 ) abort
7166 " Only activate in VimTeX buffers
7267 if ! exists (' b:vimtex' ) | return -1 | endif
7368
@@ -128,8 +123,7 @@ function! vimtex#view#inverse_search(line, filename, column = 0) abort " {{{1
128123 endif
129124endfunction
130125
131- " }}}1
132- function ! vimtex#view#inverse_search_cmd (line , filename, column) abort " {{{1
126+ function ! vimtex#view#inverse_search_cmd (line , filename, column) abort
133127 " One may call this function manually, but the main usage is to through the
134128 " command "VimtexInverseSearch". See ":help vimtex-synctex-inverse-search"
135129 " for more info.
@@ -148,9 +142,8 @@ function! vimtex#view#inverse_search_cmd(line, filename, column) abort " {{{1
148142 quitall !
149143endfunction
150144
151- " }}}1
152145
153- function ! s: inverse_search_cmd_nvim (line , filename, column) abort " {{{1
146+ function ! s: inverse_search_cmd_nvim (line , filename, column) abort
154147 if ! filereadable (s: nvim_servernames ) | return | endif
155148
156149 for l: server in readfile (s: nvim_servernames )
@@ -167,17 +160,16 @@ function! s:inverse_search_cmd_nvim(line, filename, column) abort " {{{1
167160 endfor
168161endfunction
169162
170- function ! s: inverse_search_cmd_vim (line , filename, column) abort " {{{1
163+ function ! s: inverse_search_cmd_vim (line , filename, column) abort
171164 for l: server in split (serverlist (), " \n " )
172165 call remote_expr (l: server ,
173166 \ printf (" vimtex#view#inverse_search(%d, '%s', %d)" ,
174167 \ a: line , a: filename , a: column ))
175168 endfor
176169endfunction
177170
178- " }}}1
179171
180- function ! s: nvim_prune_servernames () abort " {{{1
172+ function ! s: nvim_prune_servernames () abort
181173 " Load servernames from file
182174 let l: servers = filereadable (s: nvim_servernames )
183175 \ ? readfile (s: nvim_servernames )
@@ -198,7 +190,5 @@ function! s:nvim_prune_servernames() abort " {{{1
198190 call writefile (l: available_servernames , s: nvim_servernames )
199191endfunction
200192
201- " }}}1
202-
203193
204194let s: nvim_servernames = vimtex#cache#path (' nvim_servernames.log' )
0 commit comments