Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Desparately seeking a bilingual vim/Emacs expert

by jhourcle (Prior)
on Mar 23, 2005 at 05:27 UTC ( [id://441693]=note: print w/replies, xml ) Need Help??


in reply to Desparately seeking a bilingual vim/Emacs expert

I can help with the BBEdit settings, provided I understand the .vimrc commands correctly.

For BBEdit 7.x (I'll have to check 8.x from work, as I don't have it installed at home)

:iab dbg use Data::Dumper qw( Dumper );^Mwarn Dumper [];^[hi
I'm going to assume that it's placing the selected item in []. If so:

Make a new document containing the text

use Data::Dumper qw( Dumper );^Mwarn Dumper #SELECT#;

Save it as /Applications/BBEdit 7.1.2/BBEdit Support/Glossary/Perl.pl/dbg (or whatever your BBEdit folder is in Applications)

:iab stdappt ^?^[:r ~/.application_template^M
You can save them instead in the glossary -- /Applications/BBEdit 7.1.2/BBEdit Support/Glossary/Perl.pl/stdappt, etc.
(symlinks don't seem to be visible through the Glossary ... you could do it through scripting, but it'd seem a waste)
(repeat for the other two)
set tabstop=4      "An indentation level every four columns"
Text -> Fonts & Tabs -> Tabs: 4 spaces
set expandtab      "Convert all tabs typed into spaces"
BBEdit -> Preferences -> Editor Defaults -> Auto-Expand Tabs
(It's also in the third quick menu across the top of each window, but I have no idea what to call it officially)
set shiftwidth=4   "Indent/outdent by four columns"
No need to, as shift left/shift right use the tab spacing
set shiftround     "Always indent/outdent to the nearest tabstop"
No idea if this is possible in BBEdit. (you can always e-mail support@barebones.com)

Update: For those first four, it might be easiest to just provide a tarball that unpacks as Perl.pl (or anything else that ends in .pl, that users can drop into their glossary folder.

Update 2: You could also save the templates using Save As ... -> Save as Stationery, and then saving them in /Applications/BBEdit 7.1.2/BBEdit Support/Stationery

Update 3:BBEdit 8.x:

  • The Glossary directory is now ~/Library/Application Support/BBEdit/Glossary/, and Stationery is now ~/Library/Application Support/BBEdit/Stationery/ . There are also equivalent locations in /Library/Application Support/BBEdit/ , which would make items available to all users on the system.
  • Tabs spacing is now in the un-obvious location of Text -> Show Fonts -> Tab Width (I've written to support to complain, they said it's because they're using Apple's font picker).
  • Auto-Expand Tabs is still in the same place.

Okay, I've done all I think I can to justify my 'distinguised beta site' listing in 'About BBEdit' ... I'll drop a line to supprt, to see if they can answer the last one. (and for TextWrangler)

Update 4: I've written it up in a more unified way, and included TextWrangler 2.0 :

Please note -- some folders may need to be created, if they do not already exist. All users may write to the locations listed, but creating this directory will cause it to override the system's default support folder, which may be located in one of the following locations:

  • /Library/Application Support
  • /Applications/BBEdit 7.1.2/

See the application's user manual for more information.

Preferences Settings:
In the "Editor Defaults" screen:
  • turn on "Balance While Typing"
  • turn on "Auto-Expand Tabs"
  • turn on "Show Invisibles"
In the "Text Status Display" screen:
  • turn on "Show Line Numbers"
Adjust your tab stops to 4 spaces, located at:
BBEdit 7.x :
Text -> Fonts & Tabs -> Tabs
BBEdit 8.x / TextWrangler 2.0 :
Text -> Show Fonts -> Tab Width
Set up Stationery (templates) :
For each of the three template files, open the files in BBEdit or TextWrangler, and select
File -> Save As ...
turn on 'Save as Stationery', and save them in the following directory:
BBEdit 7.x / 8.x :
~/Library/Application Support/BBEdit Support/Stationery/
Text Wrangler 2.x :
~/Library/Application Support/TextWrangler Support/Stationery/
They will be available from the 'Stationery' palette, or from
File -> New with Stationery
Add the debugging thingy:
BBEdit 7.x / 8.x :
Create the file:
~/Library/Application Support/BBEdit Support/Glossary/Perl.pl/debug
With the contents:
use Data::Dumper qw( Dumper ); warn Dumper #SELECT#;
The Glossary will contain a 'debug' item when a Perl file is open.
TextWrangler 2.x :
Create the file:
~/Library/Application Support/TextWrangler Support/Unix Support/Unix Filters/debug
With the contents:
#!/usr/bin/perl -- print "use Data::Dumper qw( Dumper );\nwarn Dumper ",<>,';';
The scripting menu will contain a 'debug' item, accessible via:
#! -> Unix Filters -> debug

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://441693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-16 15:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found