1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-21 19:52:29 +00:00

Working better with latex and screens/monitors

This commit is contained in:
J. Fernando Sánchez 2015-01-22 23:56:14 +01:00
parent c46c149046
commit b076e8e56a
11 changed files with 190 additions and 82 deletions

View File

@ -42,7 +42,7 @@ URxvt.scrollBar: false
! Perl extensions ! Perl extensions
URxvt.perl-ext-common: default,matcher,clipboard URxvt.perl-ext-common: default,matcher,clipboard
URxvt.matcher.button: 1 URxvt.matcher.button: 1
URxvt.url-launcher: google-chrome URxvt.url-launcher: firefox
URxvt.keysym.M-c: perl:clipboard:copy URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste URxvt.keysym.M-v: perl:clipboard:paste

View File

@ -2,17 +2,17 @@
case $1 in case $1 in
"single") "single")
#xrandr --auto --output eDP1 --primary --output DP1 --off #xrandr --auto --output eDP1 --primary --output DP1 --off
~/.screenlayout/gsi-single.sh ~/.screenlayout/gsi-single.sh
xrandr --output HDMI1 --off --output DVI-1 --off --output DP1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off xrandr --output HDMI1 --off --output DVI-1 --off --output DP1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off
;; ;;
"dual") "dual")
case $2 in case $2 in
"home") "home")
xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off
;; ;;
*) *)
#xrandr --auto --output eDP1 --primary --right-of DP1 #xrandr --auto --output eDP1 --primary --right-of DP1
xrandr --output VIRTUAL1 --off --output DP1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output VGA1 --off xrandr --output VIRTUAL1 --off --output DP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output eDP1 --mode 1920x1080 --pos 1920x0 --rotate normal --output VGA1 --off
xrandr --output "DVI-1-0" --off xrandr --output "DVI-1-0" --off
;; ;;
esac esac

View File

@ -8,4 +8,4 @@ password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")
pass -c "$password" pass "$password" | xsel

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
''' '''
Spoify-remote Spoify-remote
@ -33,32 +33,32 @@ SPOTIFY_PROCESS_NAME = 'spotify'
SPOTIFY_CLOSED_CHECK = 20000 SPOTIFY_CLOSED_CHECK = 20000
class SpotifyNotify(): class SpotifyNotify():
spotifyPath = '' spotifyPath = ''
tryToReconnect = False tryToReconnect = False
tmpfile = False tmpfile = False
def __init__(self, debugger): def __init__(self, debugger):
self.debug = debugger self.debug = debugger
self.spotifyservice = False self.spotifyservice = False
self.prev = 0 self.prev = 0
self.new = False self.new = False
self.prevMeta = {} self.prevMeta = {}
self.notifyid = 0 self.notifyid = 0
self.connect() self.connect()
def __del__(self): def __del__(self):
if SpotifyNotify and SpotifyNotify.tmpfile: if SpotifyNotify and SpotifyNotify.tmpfile:
SpotifyNotify.tmpfile.close() SpotifyNotify.tmpfile.close()
def connect(self): def connect(self):
self.debug.out("Connecting to spotify.") self.debug.out("Connecting to spotify.")
self.bus = dbus.Bus(dbus.Bus.TYPE_SESSION) self.bus = dbus.Bus(dbus.Bus.TYPE_SESSION)
try: try:
self.spotifyservice = self.bus.get_object( self.spotifyservice = self.bus.get_object(
'com.spotify.qt', 'com.spotify.qt',
@ -69,16 +69,16 @@ class SpotifyNotify():
self.spotifyservice = False self.spotifyservice = False
self.debug.out("Failed to connect.") self.debug.out("Failed to connect.")
self.debug.out(e) self.debug.out(e)
def executeCommand(self, key): def executeCommand(self, key):
if not key: if not key:
return return
self.connect() self.connect()
self.debug.out("Running command: {0}".format(key)) self.debug.out("Running command: {0}".format(key))
self.cmd = self.spotifyservice.get_dbus_method(key, 'org.mpris.MediaPlayer2.Player') self.cmd = self.spotifyservice.get_dbus_method(key, 'org.mpris.MediaPlayer2.Player')
self.cmd() self.cmd()
def pollChange(self): def pollChange(self):
try: try:
self.spotifyservice = self.bus.get_object('com.spotify.qt', '/') self.spotifyservice = self.bus.get_object('com.spotify.qt', '/')
@ -90,19 +90,19 @@ class SpotifyNotify():
except Exception, e: except Exception, e:
self.debug.out('Spotify service not connected.') self.debug.out('Spotify service not connected.')
SpotifyNotify.tryToReconnect = True SpotifyNotify.tryToReconnect = True
if (self.prev != self.new): if (self.prev != self.new):
self.trackChange(self.new) self.trackChange(self.new)
self.prev = self.new self.prev = self.new
return 1 return 1
def trackChange(self, *trackChange): def trackChange(self, *trackChange):
if not trackChange[0]: if not trackChange[0]:
return return
self.prev = trackChange[0] self.prev = trackChange[0]
trackInfo = {} trackInfo = {}
trackMap = { trackMap = {
'artist' : 'xesam:artist', 'artist' : 'xesam:artist',
@ -122,10 +122,10 @@ class SpotifyNotify():
piece = str(piece[:4]) piece = str(piece[:4])
elif isinstance(piece, list): elif isinstance(piece, list):
piece = ", ".join(piece) piece = ", ".join(piece)
if not isinstance(piece, str): if not isinstance(piece, str):
piece = str(piece) piece = str(piece)
trackInfo[key] = piece.encode('utf-8') trackInfo[key] = piece.encode('utf-8')
if not self.prevMeta\ if not self.prevMeta\
@ -133,7 +133,7 @@ class SpotifyNotify():
or 'iconfilename' not in self.prevMeta\ or 'iconfilename' not in self.prevMeta\
or self.prevMeta['artist'] != trackInfo['artist']\ or self.prevMeta['artist'] != trackInfo['artist']\
or self.prevMeta['album'] != trackInfo['album']: or self.prevMeta['album'] != trackInfo['album']:
trackInfo['iconfilename'] = self.retrieveCoverImage(trackInfo) trackInfo['iconfilename'] = self.retrieveCoverImage(trackInfo)
cover_image = '' cover_image = ''
@ -145,9 +145,9 @@ class SpotifyNotify():
if cover_image == '': if cover_image == '':
cover_image = APPLICATION_DIR + 'icon_spotify.png' cover_image = APPLICATION_DIR + 'icon_spotify.png'
self.prevMeta = trackInfo self.prevMeta = trackInfo
# Connect to notification interface on DBUS. # Connect to notification interface on DBUS.
self.notifyservice = self.bus.get_object( self.notifyservice = self.bus.get_object(
'org.freedesktop.Notifications', 'org.freedesktop.Notifications',
@ -171,19 +171,19 @@ class SpotifyNotify():
trackInfo['album'], trackInfo['album'],
trackInfo['year'] trackInfo['year']
) )
# The second param is the replace id, so get the notify id back, # The second param is the replace id, so get the notify id back,
# store it, and send it as the replacement on the next call. # store it, and send it as the replacement on the next call.
self.notifyid = self.notifyservice.Notify( #self.notifyid = self.notifyservice.Notify(
"Spotify-notify", #"Spotify-notify",
self.notifyid, #self.notifyid,
cover_image, #cover_image,
trackInfo['artist'], #trackInfo['artist'],
notifyText, #notifyText,
[], #[],
{}, #{},
2000 #2000
) #)
def retrieveCoverImage(self, trackInfo): def retrieveCoverImage(self, trackInfo):
if 'arturl' in trackInfo: if 'arturl' in trackInfo:
@ -201,13 +201,13 @@ class SpotifyNotify():
trackInfo['trackhash'] trackInfo['trackhash']
) )
return iconfilename return iconfilename
def fetchCoverImageSpotify(self, artist, album, trackhash): def fetchCoverImageSpotify(self, artist, album, trackhash):
try: try:
trackid = trackhash.split(":")[2] trackid = trackhash.split(":")[2]
url = SPOTIFY_OPEN_URL + trackid url = SPOTIFY_OPEN_URL + trackid
tracksite = urllib2.urlopen(url).read() tracksite = urllib2.urlopen(url).read()
# Attempt to get the image url from the open graph image meta tag. # Attempt to get the image url from the open graph image meta tag.
imageurl = False imageurl = False
metaMatch = re.search( metaMatch = re.search(
@ -221,16 +221,16 @@ class SpotifyNotify():
) )
if contentMatch: if contentMatch:
imageurl = contentMatch.group(1) imageurl = contentMatch.group(1)
if not imageurl: if not imageurl:
self.debug.out("No cover available.") self.debug.out("No cover available.")
raise() raise()
return self.fetchCoverImage(imageurl) return self.fetchCoverImage(imageurl)
except Exception, e: except Exception, e:
self.debug.out("Couldn't fetch cover image.") self.debug.out("Couldn't fetch cover image.")
self.debug.out(e) self.debug.out(e)
return '' return ''
def fetchCoverImage(self, url): def fetchCoverImage(self, url):
@ -238,12 +238,12 @@ class SpotifyNotify():
if SpotifyNotify.tmpfile: if SpotifyNotify.tmpfile:
SpotifyNotify.tmpfile.close() SpotifyNotify.tmpfile.close()
SpotifyNotify.tmpfile = False SpotifyNotify.tmpfile = False
try: try:
SpotifyNotify.tmpfile = tempfile.NamedTemporaryFile() SpotifyNotify.tmpfile = tempfile.NamedTemporaryFile()
tmpfilename = SpotifyNotify.tmpfile.name tmpfilename = SpotifyNotify.tmpfile.name
self.debug.out("Album art tmp filepath: {0}".format(tmpfilename)) self.debug.out("Album art tmp filepath: {0}".format(tmpfilename))
coverfile = urllib2.urlopen(url) coverfile = urllib2.urlopen(url)
SpotifyNotify.tmpfile.write(coverfile.read()) SpotifyNotify.tmpfile.write(coverfile.read())
SpotifyNotify.tmpfile.flush() SpotifyNotify.tmpfile.flush()
@ -253,16 +253,16 @@ class SpotifyNotify():
self.debug.out(e) self.debug.out(e)
return '' return ''
@staticmethod @staticmethod
def startSpotify(Debug): def startSpotify(Debug):
if not SpotifyNotify.spotifyPath: if not SpotifyNotify.spotifyPath:
Debug.out("No spotify process identifier found.") Debug.out("No spotify process identifier found.")
return return
ident = SpotifyNotify.spotifyPath ident = SpotifyNotify.spotifyPath
Debug.out("Looking for spotify as: {0}".format(ident)) Debug.out("Looking for spotify as: {0}".format(ident))
procs = SpotifyNotify.checkForProcess( procs = SpotifyNotify.checkForProcess(
'ps x | grep "{0}" | grep -v grep'.format(ident), 'ps x | grep "{0}" | grep -v grep'.format(ident),
Debug Debug
@ -270,81 +270,81 @@ class SpotifyNotify():
if len(procs): if len(procs):
Debug.out("Spotify process found as: {0}".format(" ".join(procs[0]))) Debug.out("Spotify process found as: {0}".format(" ".join(procs[0])))
return return
Debug.out("Starting new Spotify now.") Debug.out("Starting new Spotify now.")
FNULL = open('/dev/null', 'w') FNULL = open('/dev/null', 'w')
spid = Popen([ident], stdout=FNULL, stderr=FNULL).pid spid = Popen([ident], stdout=FNULL, stderr=FNULL).pid
if spid: if spid:
Debug.out("Spotify started, pid: {0}.".format(spid)) Debug.out("Spotify started, pid: {0}.".format(spid))
else: else:
Debug.out("Spotify could not be started.") Debug.out("Spotify could not be started.")
@staticmethod @staticmethod
def checkForClosedSpotify(SN, Debug): def checkForClosedSpotify(SN, Debug):
if not SpotifyNotify.spotifyPath: if not SpotifyNotify.spotifyPath:
Debug.out("No spotify process identifier found.") Debug.out("No spotify process identifier found.")
return False return False
ident = SpotifyNotify.spotifyPath ident = SpotifyNotify.spotifyPath
Debug.out("Looking for spotify as: {0}".format(ident)) Debug.out("Looking for spotify as: {0}".format(ident))
procs = SpotifyNotify.checkForProcess( procs = SpotifyNotify.checkForProcess(
'ps x | grep "{0}" | grep -v grep'.format(ident), 'ps x | grep "{0}" | grep -v grep'.format(ident),
Debug Debug
) )
if len(procs): if len(procs):
Debug.out("Spotify process found as: {0}".format(" ".join(procs[0]))) Debug.out("Spotify process found as: {0}".format(" ".join(procs[0])))
if (SpotifyNotify.tryToReconnect): if (SpotifyNotify.tryToReconnect):
SN.connect() SN.connect()
return True return True
if SpotifyNotify.tmpfile: if SpotifyNotify.tmpfile:
SpotifyNotify.tmpfile.close() SpotifyNotify.tmpfile.close()
Debug.out("Spotify has been closed, therefore I die.") Debug.out("Spotify has been closed, therefore I die.")
exit(0) exit(0)
@staticmethod @staticmethod
def preventDuplicate(Debug): def preventDuplicate(Debug):
mypid = os.getpid() mypid = os.getpid()
Debug.out("My pid: {0}".format(mypid)) Debug.out("My pid: {0}".format(mypid))
proc = SpotifyNotify.checkForProcess('ps -p {0}'.format(mypid), Debug) proc = SpotifyNotify.checkForProcess('ps -p {0}'.format(mypid), Debug)
if not proc[0][3]: if not proc[0][3]:
return return
process = proc[0][3] process = proc[0][3]
search = 'ps -C {0}'.format(process) search = 'ps -C {0}'.format(process)
Debug.out("Looking for other processes named: {0}".format(process).strip()) Debug.out("Looking for other processes named: {0}".format(process).strip())
if process == 'python': if process == 'python':
if not sys.argv[0]: if not sys.argv[0]:
Debug.out("Process started using python, cannot determine script name.") Debug.out("Process started using python, cannot determine script name.")
return return
search = 'ps ax | grep "python {0}" | grep -v grep'.format(sys.argv[0]) search = 'ps ax | grep "python {0}" | grep -v grep'.format(sys.argv[0])
for line in SpotifyNotify.checkForProcess(search, Debug): for line in SpotifyNotify.checkForProcess(search, Debug):
if int(line[0]) != mypid: if int(line[0]) != mypid:
print("This program was already running.") print("This program was already running.")
Debug.out("I am a duplicate. I shall end myself. ({0})".format(" ".join(line))) Debug.out("I am a duplicate. I shall end myself. ({0})".format(" ".join(line)))
exit(0) exit(0)
@staticmethod @staticmethod
def checkForProcess(proc, Debug): def checkForProcess(proc, Debug):
output = [] output = []
for line in Popen(proc, shell=True, stdout=PIPE).stdout: for line in Popen(proc, shell=True, stdout=PIPE).stdout:
fields = line.split() fields = line.split()
if not fields[0].isdigit(): if not fields[0].isdigit():
continue continue
output.append(fields) output.append(fields)
return output return output
class DebugMe(): class DebugMe():
@ -353,11 +353,11 @@ class DebugMe():
self.output = True self.output = True
else: else:
self.output = False self.output = False
def out(self, msg): def out(self, msg):
if not self.output: if not self.output:
return return
print(">> {0}".format(msg)) print(">> {0}".format(msg))
if __name__ == "__main__": if __name__ == "__main__":
@ -387,27 +387,27 @@ if __name__ == "__main__":
default = False, default = False,
help = 'Debug messages will be displayed.' help = 'Debug messages will be displayed.'
) )
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
Debug = DebugMe(options.debug) Debug = DebugMe(options.debug)
print("Spotify-notify v0.6") print("Spotify-notify v0.6")
if SPOTIFY_PROCESS_NAME: if SPOTIFY_PROCESS_NAME:
SpotifyNotify.spotifyPath = SPOTIFY_PROCESS_NAME SpotifyNotify.spotifyPath = SPOTIFY_PROCESS_NAME
else: else:
print "Spotify is not running" print "Spotify is not running"
sys.exit(0) sys.exit(0)
SN = SpotifyNotify(Debug) SN = SpotifyNotify(Debug)
if options.action: if options.action:
action = options.action action = options.action
action = action[0:1].upper() + action[1:] action = action[0:1].upper() + action[1:]
SN.executeCommand(action) SN.executeCommand(action)
SpotifyNotify.preventDuplicate(Debug) SpotifyNotify.preventDuplicate(Debug)
try: try:
indicateserver = indicate.indicate_server_ref_default() indicateserver = indicate.indicate_server_ref_default()
indicateserver.set_type("music.spotify") indicateserver.set_type("music.spotify")
@ -417,4 +417,4 @@ if __name__ == "__main__":
pass pass
SN.pollChange() SN.pollChange()
print "Done" print "Done"

2
bin/zotero Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
~/Programs/Zotero_linux-x86_64/run-zotero.sh

View File

@ -14,3 +14,5 @@
lg1 = log --graph --all --format=format:'%C(yellow)%h%C(reset) - %C(green)(%ad)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative lg1 = log --graph --all --format=format:'%C(yellow)%h%C(reset) - %C(green)(%ad)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit
lg = !"git lg1" lg = !"git lg1"
[core]
excludesfile = /home/jfernando/.gitignore_global

52
gitignore_global Normal file
View File

@ -0,0 +1,52 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# IDEs
######
.idea
.ropeproject
# Python
######
*.pyc
# VIM
######
*.swp
*.swo
*.swn

View File

@ -222,11 +222,18 @@ assign [class="Firefox" window_role="browser"] 2: Web
for_window [class="Xfce4-notifyd"] floating enable; border none; focus mode_toggle for_window [class="Xfce4-notifyd"] floating enable; border none; focus mode_toggle
for_window [class="^URxvt$"] border 1px for_window [class="^URxvt$"] border 1px
for_window [title="^tmux$"] move to scratchpad; for_window [title="^tmux$"] move to scratchpad;
#KDE
for_window [class="Plasma-desktop"] border none
for_window [class="krunner"] border none
for_window [class="Kmix"] floating enable;
for_window [class="Plasmoidviewer"] floating enable;
for_window [class="Klipper"] floating enable; border none
#assign [class="^Gvim$"] 3: Edit #assign [class="^Gvim$"] 3: Edit
#assign [class="^Evince$"] 4: Viewer #assign [class="^Evince$"] 4: Viewer
assign [class="^Spotify$"] 6: Music assign [class="^Spotify$"] 6: Music
assign [class="^Audacious$"] 6: Music assign [class="^Audacious$"] 6: Music
assign [class="^Xchat$"] 7: Chat assign [class="^Xchat$"] 7: Chat
#for_window [class="Pcmanfm"] floating enable
workspace "1: Term" output DP1 workspace "1: Term" output DP1
workspace "2: Web" output DP1 workspace "2: Web" output DP1
@ -263,3 +270,4 @@ exec urxvt -name tmux -e tmux attach
#bindsym $mod+Pause mode "$mode_system" #bindsym $mod+Pause mode "$mode_system"
exec --no-startup-id nitrogen --restore & exec --no-startup-id nitrogen --restore &
#exec --no-startup-id compton -b --config ~/.compton.conf #exec --no-startup-id compton -b --config ~/.compton.conf
#

View File

@ -16,8 +16,9 @@ let g:LatexBox_latexmk_async=1
let g:LatexBox_latexmk_preview_continuously=1 let g:LatexBox_latexmk_preview_continuously=1
"let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $*' "let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $*'
let g:LatexBox_output_type="pdf" let g:LatexBox_output_type="pdf"
let g:LatexBox_viewer="evince" let g:LatexBox_viewer="xdg-open"
let g:LatexBox_Folding=1 let g:LatexBox_Folding=1
let g:LatexBox_quickfix=2
let tlist_tex_settings = 'latex;l:labels;s:sections;t:subsections;u:subsubsections' let tlist_tex_settings = 'latex;l:labels;s:sections;t:subsections;u:subsubsections'

19
vimperatorrc Normal file
View File

@ -0,0 +1,19 @@
set hintchars=hjklasdfgyuiopqwertnmzxcvb
" Pass through all keys (like CTRL-Z) on Gmail and Google Reader:
"autocmd LocationChange .* :js modes.passAllKeys = /(docs|mail)\.google\.com|www\.google\.com\/reader\/view/.test(buffer.URL)
"autocmd LocationChange .* :js modes.passAllKeys = /(localhost|127.0.0.1)/.test(buffer.URL)
autocmd LocationChange .* js modes.passAllKeys = false
autocmd LocationChange mail\\.google\\.com js modes.passAllKeys = true
autocmd LocationChange docs\\.google\\.com js modes.passAllKeys = true
autocmd LocationChange duckduckgo\\.com js modes.passAllKeys = true
" Make Firefox run faster by using JIT
set! javascript.options.jit.chrome=true
map <C-S-I> <S-Esc><C-S-i>
map d <C-D>
map u <C-U>
map U :undo<CR>
map x :tabclose<CR>

24
vimrc
View File

@ -298,3 +298,27 @@ set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar set guioptions-=L "remove left-hand scroll bar
let g:pymode_rope_project_root = "~/.ropeprojects"
" backup to ~/.tmp
set backup
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set backupskip=/tmp/*,/private/tmp/*
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set writebackup
" Easymotion
let g:EasyMotion_do_mapping = 0 " Disable default mappings
" Bi-directional find motion
" Jump to anywhere you want with minimal keystrokes, with just one key binding.
" `s{char}{label}`
nmap s <Plug>(easymotion-s)
nmap <Leader>w <Plug>(easymotion-bd-w)
" or
" `s{char}{char}{label}`
" Need one more keystroke, but on average, it may be more comfortable.
nmap s <Plug>(easymotion-s2)
" Turn on case sensitive feature
let g:EasyMotion_smartcase = 1