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

Disabling Mousewheel Bind
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

Categories

HOME
google-cloud-pubsub
azure-documentdb
redux
typo3
fortran
dronekit
jquery-plugins
hex
magento-1.9.2.1
x509certificate
redhawksdr
hiveql
mediarecorder
browserstack
pyodbc
ios-universal-links
rename
runtime
jpql
repeater
exchange-transport-agents
powerpivot
ibatis
airbnb
computation-theory
git-branch
android-navigation-drawer
ng-tags-input
oracle-golden-gate
gsuite
aws-certificate-manager
boosting
emr
osgi-bundle
recreate
lines
ibm-bpm
scene7
epub
android-scrollview
strategy-pattern
anypoint-studio
word-wrap
bzip2
servicebus
spring-webflow-2
yank
denodo
evaluation
standard-error
visio-2010
openpgp.js
ajv
programming-pearls
dmalloc
jtextarea
spring-social-twitter
optional-parameters
instaparse
syslog4j
qtruby
database-administration
user-profile
radar-chart
gnu-sort
database-project
musicbrainz
jsoncpp
azure-mobile-app
xml-simple
eggplant
gcc-warning
copy-on-write
data-quality-services
applinks
crtdbg.h
famous-engine
rails-migrations
android-relativelayout
sigma-grid-control
new-operator
class-library
ie-developer-tools
zend-db-table
angularjs-select2
mandelbrot
junction-table
brew
microsoft-speech-platform
sup
django-1.4
wdm
pex-and-moles
symfony-1.2
auto-compile
meego-harmattan
fxcopcmd
uccapi
konsole
time-management
user-preferences
stackless

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