WampServer

Apache, PHP, MySQL on Windows 

 
  • Accueil forum
  • Retour à WampServer
  • presentation
  • Download
  • Addons
  • Formations
  • Alter Way

 
Voir le sujet: Précédent•Suivant
Aller à : Liste des Forums•Liste des messages•Nouvelle discussion•Recherche•Connexion•Imprimer la vue
Pspad comme éditeur de texte
Envoyé par: MOli (---.156.68-86.rev.gaoland.net)
Date: 30 April 2008 à 17:47

Bonjour,

J'ai installé Wampserver 2 sur WindowsXp sur un poste local. Tout est impec niveau fonctionnement.
Cependant je souhaiterai ouvrir les fichiers de confs, depuis l'icone de Wamp situé en bas à doite de la barre des taches, directement dans Pspad au lieu de Notepad.

J'ai effectué quelques petites modifications dans certains fichiers à cette fin:

Dans Wampmanager.conf j'ai ajouté dans la section [main] la ligne suivante:
textEditor = "C:/Program Files/PSPad editor/PSPad.exe"

Dans config.inc.php j'ai ajouté la ligne suivante:
$c_textEditor = $wampConf['textEditor'];

Dans Wampmanager.tpl j'ai remplacé FileName: "notepad.exe" par FileName: "${c_textEditor}"

Seulement tous mes tests aboutissent à l'ouverture, dans Pspad, d'un fichier vierge !
Par exemple si je clique sur php.ini, Pspad s'ouvre avec un fichier vide portant le nom php.ini.
Dans la barre de titre de Pspad je peux connaitre le chemin complet --> e:\php.ini. E: étant la racine ou j'ai installé Wampserver E:\Wamp

Une petite idée du problème ?

Merci de votre attention

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: dval (---.171-244-81.adsl-dyn.isp.belgacom.be)
Date: 01 May 2008 à 17:18

salut,

donc on dirait bien que, par défaut il crée un nouveau fichier, si on ne lui en donne pas un explicitement ?

je ne connais pas ce prog. mais il a peut être besoin qu'on lui donne une instruction supplémentaire de type ligne de commande ? comme par ex : "PSPad.exe %" ou encore "PSPad.exe %1" ??

je n'ai pas le soft mais je pense qu'en allant voir comme ceci dans l'aide de pspad :
in the PSPad help - Working with PSPad / Command line parameters
tu pourrais trouver les éventuels paramètres ?

voir ici : [gogogadgetscott.info]
"[gogogadgetscott.info];
[gogogadgetscott.info]
"[gogogadgetscott.info];


et ici certainement : [gogogadgetscott.info]
"[gogogadgetscott.info];

The syntax to start PSPad from the command line is:

PSPad "drive:\path\filename" [/switch]
Note: The PSPad directory must be in your $PATH environment variable for this to work. If it isn't then you must enter the full path to the PSPad.exe file.

ou
"drive:\path\PSPad.EXE" [/switch -switch] "file1" ["file2" ...]

-------------
tentez peut-être une ligne comme : "drive:\path\PSPad.EXE" "%1"

une autre page intéressante ici : [gogogadgetscott.info]
"[gogogadgetscott.info];

--------------

bon courage et bon 1er mai smiling smiley

voir aussi le comportement par défaut
"[gogogadgetscott.info];
et
"[gogogadgetscott.info];

****************************

voir aussi sur cette page (excellent tool en passant) sur l'image, la commande de notepad est :
notepad.exe %1
[www.xs4all.nl]
"[www.xs4all.nl];

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: Otomatic (---.fbx.proxad.net)
Date: 01 May 2008 à 19:53

Bonjour,

Avec Ultraedit, pas de problèmes. Il existe un « faux » programme Notepad.exe qu'il suffit de mettre à la place du vrai Notepad.exe dans :
Windows
Windows/System32
Windows/System32/DllCache
pour que ce soit Ultraedit qui se lance lorsque Notepad.exe est demandé.

Il existe peut-être la même chose pour PsPad. Voir sur le site du développeur.

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: twohawks (---.lax.dsl-w.verizon.net)
Date: 29 May 2008 à 07:29

Hi MOli,
I was searching same problem.
Had to use Google Translation to read your message ;^)

EDIT/UPDATE: I FIXED IT. HERE IS HOW I GOT MINE WORKING:

Changing the default text editor for the Wamp Server2 Tray Menus
from NotePad to EditPadPro (or whatever you desire),
plus added code for opening vHosts file from the menu too...

5 FILES INVOLVED:

*** WAMP/SCRIPTS/CONFIG.INC.PHP: 3 EDITS
1) under "//on renseigne les variables du template avec la conf locale" ADD LINE
$c_textEditor = $wampConf ['textEditor2'];
//['textEditor1'] for notepad, ['textEditor2'] for editpadpro or alternate editor as set in wampmanger.conf (see ahead)

2) Add the following line to section "// on construit les variables correspondant aux chemins"
$c_apacheVHostsConfFile = str_replace('/','\\',$c_apacheVersionDir.'/apache'.$wampConf['apacheVersion'].'/'.$wampConf['apacheConfDir'].'/extra/'.$wampConf['apacheVHostsConfFile']);

3) Edit the log variable line to be:
$logDir = 'logs\\'; //allows log files to open in chosen editor

*** WAMP/WAMPMANGER.CONF: 2 EDITS
Under [main] ADD LINES:
textEditor1 = "notepad.exe"
textEditor2 = "editpadpro.exe" //<<YOUR ALTERNATE EDITOR HERE. MAY NEED FULL PATH

*** WAMP/WAMPMANGER.TPL: SEVERAL EDITS
1) ADD FOLLOWING 4 LINES BEFORE "$tpl = <<< EOTPL"
$c_apacheConfFile = str_replace('/','\\',$c_apacheConfFile);
$c_phpConfFile = str_replace('/','\\',$c_phpConfFile);
$c_mysqlConfFile = str_replace('/','\\',$c_mysqlConfFile);
$c_mysqlConfFile = str_replace('.\\','',$c_mysqlConfFile);

2) THEN FIND all occurances of "notepad.exe" and REPLACE with "${c_textEditor}"

*** WAMP/WAMPMANGER.INI: 1+EDIT...
1+) FIND all occurances of "notepad.exe" and REPLACE with "type-your-editor-here.exe"

*** WAMP/SCRIPTS/REFRESH.PHP: 2 EDITS (There are 2 occurances of "$c_textEditor". Apply str_replace to 'parameters...
1) CHANGE Line~399 FROM THIS
Type: item; Caption: "Edit .htaccess"; Glyph: 6; Action: run; FileName: "'.$c_textEditor.'"; parameters: "'.$newalias_dest.'.htaccess"
TO THIS
Type: item; Caption: "Edit .htaccess"; Glyph: 6; Action: run; FileName: "'.$c_textEditor.'"; parameters: "'.str_replace('/','\\',$newalias_dest).'.htaccess"

2) CHANGE Line~412 FROM THIS
Action: run; FileName: "'.$c_textEditor.'"; parameters:"'.$c_installDir.'/alias/'.$newalias_dir.'.conf"; Flags: waituntilterminated
TO THIS:
Action: run; FileName: "'.$c_textEditor.'"; parameters:"'.str_replace('/','\\',$c_installDir).'\\alias\\'.str_replace('/','\\',$newalias_dir).'.conf"; Flags: waituntilterminated

==============================
THANK YOU MOLI for your posting about this... helped me get a good start for figuring out a solution.
Please post back if you tried this and it worked (it should work ;^)

Cheers,
TwoHawks
Stateline, NV USA ;^)

Love is the Function, No Form is the Tool.



Modifie 4 fois. Derniere modification le 30/05/2008 à 09:29 par twohawks.

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: lolo irie (195.145.31.---)
Date: 01 July 2008 à 15:45

I did your hack on the 2.0c and... it's just brillant !
BTW I did it for PSPad, so I can confirm it's working with this free editor.

Thanks a lot TwoHawks, you saved my day !!!

I really hope we will see a config option in the future to choose quickly our favorite editor.
Si Romain passe par là... Encore bravo à lui d'ailleurs...winking smiley

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: dval (---.198-246-81.adsl-dyn.isp.belgacom.be)
Date: 02 July 2008 à 00:10

merci d'avoir publié et commenté ces tips, tous les utilisateurs de wampserver (et Romain) vont en profiter grâce à vous.
bat.

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: twohawks (---.lax.dsl-w.verizon.net)
Date: 02 July 2008 à 03:03

Hurray! Thank you lolo and dval for commenting back... I was wondering if/when anyone else would have tried this out. Glad it is working for others and is relevant solution for this problem.
Cheers,
TwoHawks

Love is the Function, No Form is the Tool.

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: mcorne (---.w82-124.abo.wanadoo.fr)
Date: 12 September 2010 à 15:03

Here is a quickfix to change notepad to notepad++ in the wampserver. (This should work for any other editor.)

1) add the following line in the [main] section of wampmanager.conf

editor = "C:\Program Files (x86)\Notepad++\notepad++.exe"

2) add the following line somewhere after parse_ini_file() in config.inc.php

$c_editor = $wampConf['editor'];

3) change all occurrences of notepad.exe to ${c_editor} in wampmanager.tpl

4) right click on the wampserver icon to refresh the wamp server

5) click on the wampserver icon, select PHP, then select php.ini (for example) which should open in notepad++

Hope this helps.

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: toumimi (---.135.75-86.rev.gaoland.net)
Date: 17 September 2010 à 21:58

[Still French forum here]
You can download my patch which allows you to change editor path from its web interface smiling smiley
Many other features included in... Have a look !

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: Répondre•Citer ce Message
Re: Pspad comme éditeur de texte
Envoyé par: twohawks (---.dsl.mindspring.com)
Date: 20 October 2010 à 04:51

Very nice, Florian!
THANK YOU!

Love is the Function, No Form is the Tool.

Options: Répondre•Citer ce Message


Aller à : Liste des Forums•Liste des messages•Recherche•Connexion
Désolé, seuls les utilisateurs connectés peuvent envoyer des messages dans ce forum.
Cliquer ici pour se connecter

design by jidePowered by Alter Way get firefoxget PHP