[TxMt] Re: TextMate for sysadmins

Rob McBroom textmate at skurfer.com
Tue Nov 4 21:12:24 UTC 2008


On 2008-Nov-4, at 1:03 PM, Andrea Crotti wrote:

> First a question, is there someone using textmate to work on unix  
> servers??

For editing files here and there (especially scripts), but not to any  
great extent.

> I thought that with sshfs and the power of bundles I could do  
> something
> really nice, much better than using vim (which is a great software  
> anyway)
> in ssh...

Have you heard of Puppet?

  <http://reductivelabs.com/trac/puppet/wiki/AboutPuppet>

I'm about to start using it where I work. It might take care of most  
of the things you're looking to do via TM. Now, if someone would  
create a grammar for Puppet config files… :)

> 1. If I create a language for every software (a grammar for monitrc, a
> grammar for apache etc...) I will get too many languages, is there a  
> way to
> create a group of languages??

A single Bundle can contain multiple Language Grammars if you want.  
Note that a lot of things are already defined (Apache config, for  
instance), so be sure to check before creating a new grammar.

> 2. Good ways to send command to external servers??
> Maybe just open a shell and ssh <host> <cmd>?

Or have a TextMate command that does this, or type the command in the  
editor window and hit ⌃R. Knowing the hostname will be the hard part  
(assuming you don't want to type it manually each time).

> 3. There are any kind of problems working with TM+sshfs (if you know)?

I have seen the following problem:

   * mount something with SSHFS
   * open a file
   * close the file
   * edit the file remotely (not via the mounted SSHFS filesystem)
   * open the file again
   * the changes aren't there

But this was probably two years ago when MacFUSE was very immature. I  
would do some testing before using it, but that issue has probably  
been fixed.

> I have also created a good (I think) way to document servers, with  
> latex and
> custom scripts, if anyone interested in TM + sysadmin work is  
> welcome to
> write me, I could publish everything somewhere..

I prefer LDAP for this because:

   * LDAP commands are on most systems by default
   * manipulating the data is just a matter of editing text
   * many things (Postfix, Puppet, sudo) can use LDAP without  
modification
   * most scripting languages have LDAP support

So, I can use custom scripts to make things easier, but if I find  
myself on a system without them, I can still do just about anything  
the "long way". If you ever want something pretty, you could always  
auto-generate some HTML or Latex based on what's in LDAP. Contact me  
directly if you want more details.

(On a related note, I've got an LDIF grammar started for TextMate, but  
I haven't shared it with anyone.)

-- 
Rob McBroom
<http://www.skurfer.com/>

Because it screws up the order in which people normally read text.

Original message:

> Why is it bad to top-post your reply?




More information about the textmate mailing list