#SingleInstance force
#r::Send ^r ;reload
#z::Send ^z ; undo
#y::Send ^y ; redo
#f::Send ^f ; find inside apps
#c::Send ^c ; copy
#x::Send ^x ; cut
#v::Send ^v ; paste
#a::Send ^a ; select all
#t::Send ^t ; new tab in browser (IE, Safari, Firefox, etc)
#s::Send ^s ; save inside apps
LWin & Tab::AltTab ; the motherlode, alt-tab!
#Up::Send {PgUp} ; PgUp
#Down::Send {PgDn} ; PgDown
#Left::Send {home} ; Home
#Right::Send {end} ; End
#LButton::^LButton
•all other Cmd+ goes to Ctrl+
I don't know about that, is it possible or not, but most common options should be covered with that script
P.S You can set AutoHotkey to start automatically when windows starts, like any other program on windows - just copy a shortcut to AutoHotkey to folder
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
If you are running windows on virtualbox not with bootcamp, then remeber to change your "Host" key from Left Command to Right Command (from Virtualbox (NOT Virtualbox VM) menu "VirtualBox"->"Preferences"->"Input") to make those shortcuts work
In :help Gist
, there is a setting that automatically copies the gist link to your clipboard with :Gist -c
If you set g:gist_clip_command, gist.vim will copy the gist code with option '-c'.
Mac:
let g:gist_clip_command = 'pbcopy'
Linux:
let g:gist_clip_command = 'xclip -selection clipboard'
Others (cygwin?):
let g:gist_clip_command = 'putclip'
Add this to your ~/.vimrc
and you're good to go.
Edit:
Found a hackish solution.
Go to gist.vim
and find this function.
function! s:GistPost(user, token, content, private)
" find GistID: in content, then we should just update
...
let location = substitute(location, '^[^:]\+: ', '', '')
if len(location) > 0 && location =~ '^\(http\|https\):\/\/gist\.github\.com\/'
redraw
echo 'Done: '.location
else
...
return location
endfunction
Change echo
to echomsg
.
if len(location) > 0 && location =~ '^\(http\|https\):\/\/gist\.github\.com\/'
redraw
echomsg 'Done: '.location
Now restart vim, and after entering :Gist
, type :message
to get the link from the message-history. The message-history logs everything from echomsg
and echoerr
for that session.
Best Answer
<D->
only works in MacVim.A quick google will return a bunch of hacks and third party solutions. All the solutions I know either work system-wide or are application-specific: if you remap
Cmd
in iTerm2 only, how are you going to open a new window or a new tab? With… with… the… MOUSE?I can't imagine a good reason to remap the
Cmd
key to anything on a Mac. That would be insane.Vim is not TextMate or whatever other editor you have used before. There is no way to transfer all your old habits seamlessly, point blank.
Instead of wasting your time trying to make Vim and your terminal into something that it's not and can't be you should learn how to use and customize Vim wisely. All your
Cmd
+Shift
+Ctrl
+Alt
combos won't lead you anywhere. Especially in a terminal whereAlt
is often problematic andCmd
unusable.Consider using
<leader>
(:help leader
):