There are some really minor VIM features that I miss. Does TextMate have a way to:
* Visually show that a file is Read Only (which lets me know I need to do a p4 edit on the file) * Show in the status bar at the bottom of the main window how far into the file the cursor is as a percentage of the file size
Thanks,
Ernest
Hey Hey Hey!!
Another perforce user!! I TOTALLY Agree with your first comment. This should be an option in preferences - by default even read only files are writeable and this is not always (in the case of SCM's) desirable!!
On a side note - you want to improve the perforce bundle?
---
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
Ernest Obusek ernest@willowfalls.net Sent by: textmate-bounces@lists.macromates.com 03/08/07 02:56 PM Please respond to TextMate users textmate@lists.macromates.com
To TextMate users textmate@lists.macromates.com cc
Subject [TxMt] VIM features I miss
There are some really minor VIM features that I miss. Does TextMate have a way to:
* Visually show that a file is Read Only (which lets me know I need to do a p4 edit on the file) * Show in the status bar at the bottom of the main window how far into the file the cursor is as a percentage of the file size
Thanks,
Ernest
______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 03/08/07 16:56:22, Ernest Obusek wrote:
- Visually show that a file is Read Only (which lets me know I need
to do a p4 edit on the file)
Yeah that would be a good feature. A little hint in the title would really help.
Like: $document.txt (read only)
- Show in the status bar at the bottom of the main window how far
into the file the cursor is as a percentage of the file size
Well, you see on the scroll bar how big the file is. I don't think a value in per cent would give more information. With the cursor? I don't know, maybe an indicator in the scroll bar, where the cursor currently is.
When I scroll through my documents it is sometimes awfull to get suddenly to a complete different place just because I forgot where I left the cursor.
Thomas
Thomas Bohn wrote:
On 03/08/07 16:56:22, Ernest Obusek wrote:
- Show in the status bar at the bottom of the main window how far
into the file the cursor is as a percentage of the file size
Well, you see on the scroll bar how big the file is. I don't think a value in per cent would give more information. With the cursor? I don't know, maybe an indicator in the scroll bar, where the cursor currently is.
When I scroll through my documents it is sometimes awfull to get suddenly to a complete different place just because I forgot where I left the cursor.
This would be nice.
The Colloquy IRC client does something similar (well, visually) - it displays black markers in the scrollbar where someone mentions your name, and red markers for matches if you run a search: http://henrik.nyh.se/dump/colloquy-scrollbar.png
On Mar 8, 2007, at 6:24 PM, Thomas Bohn wrote:
On 03/08/07 16:56:22, Ernest Obusek wrote:
- Visually show that a file is Read Only (which lets me know I need
to do a p4 edit on the file)
Yeah that would be a good feature. A little hint in the title would really help.
Like: $document.txt (read only)
So maybe I am missing something, but what do you mean by read-only? What is it that determines if the file is read-only or not? You either have write-access to the file or not, and if you do not then you wouldn't be able to save it anyway, while if you do then the file is not read-only. And how would TM determine if the file is read-only or not? I suppose it could try to write to the file, but wouldn't that alter the modification date on every file where this is successful, which is certainly not desirable? Or is there a tool to test if a particular file is write-accessible to the current user? And what if you want to edit some files that you only have access to in administrator mode?
Sorry if this is a stupid question, I guess I just don't get it.
- Show in the status bar at the bottom of the main window how far
into the file the cursor is as a percentage of the file size
Well, you see on the scroll bar how big the file is. I don't think a value in per cent would give more information. With the cursor? I don't know, maybe an indicator in the scroll bar, where the cursor currently is.
When I scroll through my documents it is sometimes awfull to get suddenly to a complete different place just because I forgot where I left the cursor.
Can't resist, but it's called the caret, while the cursor is the mouse pointer. E.g.:
Caret: http://developer.apple.com/documentation/Carbon/Conceptual/ ATSUI_Concepts/atsui_chap5/chapter_5_section_2.html
Cursors: http://developer.apple.com/documentation/UserExperience/Conceptual/ OSXHIGuidelines/XHIGCursors/chapter_15_section_2.html#//apple_ref/doc/ uid/TP40002724-TPXREF101
Thomas
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On 2007-03-08 18:M, Charilaos Skiadas threw down some bits like this:
So maybe I am missing something, but what do you mean by read-only? What is it that determines if the file is read-only or not? You either have write-access to the file or not, and if you do not then you wouldn't be able to save it anyway, while if you do then the file is not read-only. And how would TM determine if the file is read-only or not? I suppose it could try to write to the file, but wouldn't that alter the modification date on every file where this is successful, which is certainly not desirable? Or is there a tool to test if a particular file is write-accessible to the current user? And what if you want to edit some files that you only have access to in administrator mode?
Sorry if this is a stupid question, I guess I just don't get it.
if a file is mode 444 then you can read it but TM will prompt you to override when you try to save. An example of another editor's behaviour is Emacs. If the mode is not writable then you can't modify the buffer. This would be nice to have in TM, but barring that maybe a window title notice.
I guess the way you'd think about it is something like this in psuedo-python:
if not os.access(file, os.W_OK): windowBufferModifiable(False) else: windowBufferModifiable(True)
Then again I just need to be smarter about doing p4 edit first :)
Dan
On Mar 8, 2007, at 5:50 PM, Charilaos Skiadas wrote:
So maybe I am missing something, but what do you mean by read-only?
Perforce (SCM) sets files to read-only when they are checked in, and makes them writable when they are checked out.
Ideally there would be a command that can be run when a user first tries to modify a read-only file. That way we could have a script that checks if the file is under perforce control, and offers to check it out. jEdit has been doing that for years...
Gerd
In fact.. We can do all of this very easily.. The environment variable P4ROOT establishes the base directory of the directory under revision control. To see if a file is under perforce revision control you use `p4 fstat` and it will tell you the status of the file ( return 0 ) or if it's not under revision control it returns 1.
---
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
Gerd Knops gerti-textmate@bitart.com Sent by: textmate-bounces@lists.macromates.com 03/08/07 05:34 PM Please respond to TextMate users textmate@lists.macromates.com
To TextMate users textmate@lists.macromates.com cc
Subject Re: [TxMt] VIM features I miss
On Mar 8, 2007, at 5:50 PM, Charilaos Skiadas wrote:
So maybe I am missing something, but what do you mean by read-only?
Perforce (SCM) sets files to read-only when they are checked in, and makes them writable when they are checked out.
Ideally there would be a command that can be run when a user first tries to modify a read-only file. That way we could have a script that checks if the file is under perforce control, and offers to check it out. jEdit has been doing that for years...
Gerd
______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 9. Mar 2007, at 01:33, Gerd Knops wrote:
[...] Ideally there would be a command that can be run when a user first tries to modify a read-only file. That way we could have a script that checks if the file is under perforce control, and offers to check it out. jEdit has been doing that for years...
Yeah, I know you asked for this eons ago ;) when TM has a general event / callback system, it should be easier to add things like this.