key-bindings


Get file path + file name in a keybindings file in Sublime Text 2


I'm trying to get the path of the current file + the file's name (without extension) in a Key Binding file in Sublime Text 2. $file_path or ${file_path} are both not working.
The reason is that I want to execute an *.exe file, which was built before (but don't want to both build and execute in one step). Any ideas?
Greetz
you may try the sublime-snippet, this is my code:
#filename: filename.sublime-snippet
<snippet>
<content><![CDATA[$TM_FILENAME]]></content>
<!-- Optional: Tab trigger to activate the snippet -->
<tabTrigger>fn</tabTrigger>
<!-- Optional: Scope the tab trigger will be active in -->
<scope>source.python</scope>
<!-- Optional: Description to show in the menu -->
<description>the current file name</description>
</snippet>
when you type 'fn' in python source files, you will get your filename.
Sublime offers a command called copy_path which will copy the current file's absolute path to the clipboard. Unfortunately, this includes the file extension. But if you're familiar with how to roll your own quick plugin, you can issue copy_path therein, and perform some basic string manipulation to strip the file extension. If not though, you can bind copy_path to a key combination and work from there.

Related Links

Fish shell ESC/META keybinding with iterm2 on os x yosemite
XMonad: Is there a way to bind a simultaneously triggered keychord?
Simple key binding issue
unable to get C-PGUP or C-PGDOWN key codes in tmux
How do I override a default keybinding in LightTable?
Is it possible to change key bindings in Sublime Text dynamically from a plugin?
Ace Editor - Change CTRL+H keybinding
KeyBindings in Java stop working after component is remade
Tmux Scroll Up/Down Page using Ctrl-b and Ctrl-f
How to create key binding to set XML syntax?
How to bypass a bindkey directive in GNU screen?
XMonad keybindings doesn't work
Get file path + file name in a keybindings file in Sublime Text 2
GNU screen custom key bindings format
Sublime Text 2 up/down arrow movement keybinding
tmux up-pane/down-pane missing

Categories

HOME
reactjs
gulp
netty
window.open
esxi
grid
confluence-rest-api
yuv
collision-detection
cdn
core-data
suitecrm
aspectj
guidewire
desktop-application
fine-uploader
webseal
sha1
openstack-horizon
owncloud
vivado-hls
ibatis
geography
gpo
glibc
summernote
openoffice-basic
gomobile
gnu-screen
aspxgridview
pixels
scalatest
angular2-changedetection
setup-project
request-uri
dynamics-ax-2012-r3
ds-5
ipython-parallel
apm
blockly
kubectl
visual-prolog
android-scrollview
zimbra
intersection
scip
dotnetnuke-module
word-wrap
armadillo
server-side-swift
ui-grid
jquery-ui-slider
binary-decision-diagram
python-venv
google-chrome-storage
skype-bots
standard-error
vertex
playframework-1.x
r-commander
trusted-computing
iban
nls
vertex-shader
addressbook
gevent
git-push
boost-range
std
fadein
sqldataadapter
matlab-engine
kramdown
wiql
jain-sip
joomla3.3
pagecontrol
pdcurses
stereotype
photogrammetry
valdr-bean-validation
kss
apache-pivot
scjp
opencobol
xps
kernel-density
flask-mongoengine
vbaccelerator
grape-api
ironworker
caroufredsel
panelgrid
wordbreaker
servicemanager
boost.build
qt5.1
metapost
tasklist
correctness
blackberry-eclipse-plugin
django-admin-tools
bash4
scriptmanager
execjs
funambol
functional-specifications
cpack
dynamic-scope
opengl-to-opengles
high-load

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App