Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
katarakt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Harbecke
katarakt
Commits
4bced812
Commit
4bced812
authored
6 years ago
by
Philipp Erhardt
Browse files
Options
Downloads
Patches
Plain Diff
Modernize synctex-katarakt-vim
parent
99735bc0
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/synctex-katarakt-vim.py
+7
-10
7 additions, 10 deletions
share/synctex-katarakt-vim.py
with
7 additions
and
10 deletions
share/synctex-katarakt-vim.py
+
7
−
10
View file @
4bced812
#!/usr/bin/env python3
# Dependencies:
# Dependencies
(Debian/Ubuntu package names)
:
#
# python-g
object2
# python-dbus
# python
3
-g
i
# python
3
-dbus
#
# Thorsten Wißmann, 2015
...
...
@@ -47,14 +47,14 @@ Hint: VIM configuration:
Add the following line to your vimrc:
au
VimEnter
*.tex execute
"
nmap ZE :! synctex-katarakt-vim
"
. v:servername .
"
2>/dev/null >/dev/null &<LEFT><LEFT>
"
au
BufRead
*.tex execute
"
nmap ZE :! synctex-katarakt-vim
"
. v:servername .
"
2>/dev/null >/dev/null &<LEFT><LEFT>
"
When typing ZE the first time, it automatically calls this script, overwrites
the ZE keybinding, and opens a katarakt instance. After typing ZE the first
time, you are prompted such that you can specify an alternate PDF file. If
you want an alternate vim keybinding (e.g. <Leader>f), add this line:
au
VimEnter
*.tex execute
"
nmap ZF :! VIM_KEY=
'
ZF
'
synctex-katarakt-vim
"
. v:servername .
"
2>/dev/null >/dev/null &<LEFT><LEFT>
"
au
BufRead
*.tex execute
"
nmap ZF :! VIM_KEY=
'
ZF
'
synctex-katarakt-vim
"
. v:servername .
"
2>/dev/null >/dev/null &<LEFT><LEFT>
"
If your key contains something like <Leader> (or other keys containing
"
<
"
),
escape it properly in the VIM_KEY= assignment.
...
...
@@ -63,7 +63,7 @@ Hint: VIM configuration:
import
gobject
from
gi.repository
import
GLib
import
sys
import
dbus
import
dbus.service
...
...
@@ -78,7 +78,7 @@ from dbus.mainloop.glib import DBusGMainLoop
# tell dbus that we use the gobject main loop
DBusGMainLoop
(
set_as_default
=
True
)
loop
=
gobject
.
MainLoop
()
loop
=
GLib
.
MainLoop
()
#########################################
...
...
@@ -200,8 +200,5 @@ def quit_if_pdf_exits():
thread
=
threading
.
Thread
(
target
=
quit_if_pdf_exits
,
args
=
())
thread
.
start
()
# enable threads again, otherwise the quit_if_pdf_exits-thread will not be
# executed
gobject
.
threads_init
()
loop
.
run
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment