Skip to content

Instantly share code, notes, and snippets.

@nicodmf
Last active January 31, 2017 16:26
Show Gist options
  • Save nicodmf/68af329507a05f01eff8ece9ef0bb346 to your computer and use it in GitHub Desktop.
Save nicodmf/68af329507a05f01eff8ece9ef0bb346 to your computer and use it in GitHub Desktop.
# dans ~/.local/share/applications/
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=editor
Exec=/usr/local/bin/run-editor.sh %U
Icon=/home/nico/Images/icons/netbeans.png
Terminal=false
MimeType=x-scheme-handler/editor
# dans ~/.local/share/applications/mimeapps.list
[Default Applications]
text/html=google-chrome.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop
x-scheme-handler/editor=editor.desktop
#!/bin/bash
url="$1"
url=${url#*file=}
line=${url##*line=}
url=${url%%&line=*}
project=${url##*project=}
file=${url%%&project*}
file=${file//\%2F/\/}
case $project in
ll)
projectdir="/home/nico/sources/ll-reservation"
;;
esac
file=$(echo $file | sed -e "s#/var/www/html#$projectdir#g" )
echo "'"$project"'" $line $file $projectdir aaa
# Netbeans
/usr/local/netbeans-8.2/bin/netbeans "$file:$line"
# PhpStorm
#phpstorm --line $line "$file"
# Kate
#kate --line $line "$file"
# Vim
#vim "$file" +$line
# Gedit
#gedit +$line "$file"
# Komodo
#komodo "$file#$line"
@nicodmf
Copy link
Author

nicodmf commented Jan 31, 2017

copier les trois fichiers et ajouter dans la configuration de développement :

framework:
    ide: 'editor://open?file=%%f&project=ll&line=%%l'

ajouter la configuration suivante http://symfony.com/doc/current/reference/configuration/framework.html#ide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment