Re: A question for developers
On Monday 17 August 2009 04:14:18 Steve Bertrand wrote: > Manish Jain wrote: > > You are right. Syntax highlighting only works well with X. On the > > console, to the best of knowledge, there is no way to change the colours > > through vim's rc files. > > Syntax colour changing does work via .vimrc on the console. The > constructs are named differently: ctermfg, cterm etc. > > The default however uses bright yellow and very light blue for many > things, which doesn't appear well on my white console. If you have a set bg=dark line in .vimrc, remove it. or explicitly set bg=light. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
Manish Jain wrote: > You are right. Syntax highlighting only works well with X. On the > console, to the best of knowledge, there is no way to change the colours > through vim's rc files. Syntax colour changing does work via .vimrc on the console. The constructs are named differently: ctermfg, cterm etc. The default however uses bright yellow and very light blue for many things, which doesn't appear well on my white console. Also, there is only a limited number of colours for the console. Your scheme provided me with what I needed in order to play around for myself. >>> With that said, I can tell that what you provided me with is much better >>> than the default. I'll play around this afternoon and see what I can >>> come up with. > > I am really glad you like my colour set. Please pass it on to anyone who > might be interested. > > I do not know what your level of expertise with Vim is. Provided you are > or intend to be serious user and that your knowledge is somewhere in the > range of beginner to intermediate, I might be able to help a little > further. Well, I just started with it about a week or two ago, but I plan on using this as my editor from now on. > Attached is vimref.txt (in a zip), which I created as a > mini-reference for everything I found useful for daily work. Please go > through this file AFTER running vim's own tutor. > > Some lines from my .vimrc which you may find useful : > > set backspace=2 whichwrap+=<,>,[,] > vnoremap d > > set autoindent > set nobackup > set nohlsearch > set nonumber > set ruler > set linebreak > set wrap > set laststatus=2 > set tabstop=4 > set shiftwidth=4 > set noexpandtab > set showmode > set nocompatible > set vb t_vb= > set display=lastline > set ignorecase > set nomodeline Many of these were documented in the tutor, and others I have found while reading other docs. Thanks! Steve smime.p7s Description: S/MIME Cryptographic Signature
Re: A question for developers
Manish Jain wrote: > Hi Steve, > >> Vim also does colours/syntax highlighting I found, but quickly disabled >> the colours, as I didn't like them as much as I thought I would. > > I wouldn't blame you for not liking Vim's default syntax highlighting. > However, you can try the my set instead which took me days to fine-tune > to my liking. Thanks much for the info Manish! The best I can tell, your colour scheme file is for GUI. Is this correct? (it doesn't change my console to your colour scheme... it remains default when I enable syntax). With that said, I can tell that what you provided me with is much better than the default. I'll play around this afternoon and see what I can come up with. Cheers! Steve smime.p7s Description: S/MIME Cryptographic Signature
Re: A question for developers
Hi Steve, Vim also does colours/syntax highlighting I found, but quickly disabled the colours, as I didn't like them as much as I thought I would. I wouldn't blame you for not liking Vim's default syntax highlighting. However, you can try the my set instead which took me days to fine-tune to my liking. (But first, put the following line into your .vimrc : map :syntax on :so ~/syntax.vim Then after starting gvim, press F12. That's the wat I do it.) ~/syntax.vim contents : hi Cursor guifg=white guibg=black hi Identifier guifg=black gui=bold hi NonText guibg=grey72 "black hi Normal guifg=black hi Statement guifg=black hi shFunction guifg=black gui=bold "grey30 hi Comment guifg=grey30 hi shCommandSub guifg=grey30 gui=bold "red hi Constant guifg=red hi Directory guifg=red hi cFormat guifg=red gui=bold "light-brown hi shSpecial guifg=#b07030 hi SpecialKey guifg=#b07030 hi shOption guifg=#b07030 hi shCase guifg=#b07030 "green hi Special guifg=#007700 gui=bold hi shExprRegion guifg=#007700 gui=bold hi PreProc guifg=#007700 gui=bold hi Statement guifg=#007700 gui=bold hi Repeat guifg=#007700 gui=bold hi shRepeat guifg=#007700 gui=bold hi shConditional guifg=#007700 gui=bold hi shStatement guifg=#007700 gui=bold "deep-blue hi Type guifg=#99 gui=bold hi shShellVariables guifg=#99 hi shVariable guifg=#99 "muddy brown hi String guifg=#dd4400 hi shString guifg=#dd4400 "black on yellow hi IncSearch guibg=yellow guifg=black hi Search guibg=yellow guifg=black hi Question guibg=yellow guifg=black "other hi Operator guifg=#0088ee gui=bold "blue hi shOperator guifg=#0088ee gui=bold hi StorageClass guifg=#bb0099 gui=bold "purplish hi SpecialChar guifg=#00aa88 gui=bold "greenish cyan -- Regards Manish Jain invalid.poin...@gmail.com +91-96500-10329 Laast year I kudn't spell Software Engineer. Now I are won. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
Giorgos Keramidas wrote: > On Wed, 12 Aug 2009 15:49:17 -0400, Henry Olyer wrote: >> Look, use Joe. >> >> You won't ever want anything else -- you'll soon forget about >> meta-escape-alt-@ while holding down the esc-tab-plus key, all the >> while wishing you had three hands. > > That's not a very good way of describing editors/joe. It is unfair both > to other editors and to joe itself. > > There *are* good points about joe, eg.: > > - It works very well even with pretty dumb terminals. > > - It has a very small footprint > > - It supports many features a `coder' expects (auto indentation, > custom tab sizes, macros, etc.) > > It is much nicer to describe the *good* points about joe, instead of > making silly jokes about keyboard shortcuts in other editors. I fully agree. To be quite honest, the way Emacs does things doesn't bother me in the least. However, I found that Vi(m) falls more inline with how I work. It only took going through the tutorial a couple of times before I was using it as my full time editor. The tutorial works really well for 'burning in' the actions. I really like how quickly I can move about my docs, run commands/programs from inside the editor, splice external files/command output into the current doc, it's search/replace etc. Vim also does colours/syntax highlighting I found, but quickly disabled the colours, as I didn't like them as much as I thought I would. Giving it a try was no where near as intimidating as I have been told it was. Now that I have the basics down, it's trivial to periodically search the web to find out new things it can do. It is the default editor in FreeBSD, so it's a natural fit anyway. All of the feedback, tips & tricks and config files have been very much appreciated! Steve smime.p7s Description: S/MIME Cryptographic Signature
Re: A question for developers
On Wed, Aug 12, 2009 at 9:53 PM, Polytropon wrote: > On Thu, 13 Aug 2009 00:08:52 +0300, Giorgos Keramidas > wrote: >> There *are* good points about joe, eg.: >> >> - It works very well even with pretty dumb terminals. >> >> - It has a very small footprint >> >> - It supports many features a `coder' expects (auto indentation, >> custom tab sizes, macros, etc.) > > Syntax highlighting! Syntax highlighting! :-) > > Other points are automatic file backups, different modes > (depending on $0) and so on. > > > >> It is much nicer to describe the *good* points about joe, instead of >> making silly jokes about keyboard shortcuts in other editors. > > If you make jokes, use the recommended ones, such as the > well-known escape-meta-alt-control-shift key combinations. :-) > Don't forget about: C-x M-c M-butterfly [1] :-) [1] - http://xkcd.com/378/ -- Glen Barber ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
On Thu, 13 Aug 2009 00:08:52 +0300, Giorgos Keramidas wrote: > There *are* good points about joe, eg.: > > - It works very well even with pretty dumb terminals. > > - It has a very small footprint > > - It supports many features a `coder' expects (auto indentation, > custom tab sizes, macros, etc.) Syntax highlighting! Syntax highlighting! :-) Other points are automatic file backups, different modes (depending on $0) and so on. > It is much nicer to describe the *good* points about joe, instead of > making silly jokes about keyboard shortcuts in other editors. If you make jokes, use the recommended ones, such as the well-known escape-meta-alt-control-shift key combinations. :-) (Finally, I'm the wrong person to have an opinion here, because I never used emacs much; its magic didn't open up to me. But joe is really a great editor, powerful, and still easy to use.) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
On Wed, 12 Aug 2009 15:49:17 -0400, Henry Olyer wrote: > Look, use Joe. > > You won't ever want anything else -- you'll soon forget about > meta-escape-alt-@ while holding down the esc-tab-plus key, all the > while wishing you had three hands. That's not a very good way of describing editors/joe. It is unfair both to other editors and to joe itself. There *are* good points about joe, eg.: - It works very well even with pretty dumb terminals. - It has a very small footprint - It supports many features a `coder' expects (auto indentation, custom tab sizes, macros, etc.) It is much nicer to describe the *good* points about joe, instead of making silly jokes about keyboard shortcuts in other editors. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
Look, use Joe. You won't ever want anything else -- you'll soon forget about meta-escape-alt-@ while holding down the esc-tab-plus key, all the while wishing you had three hands. On Tue, Aug 11, 2009 at 10:40 PM, Mel Flynn < mel.flynn+fbsd.questi...@mailing.thruhere.net > wrote: > On Tuesday 11 August 2009 16:46:16 Steve Bertrand wrote: > > Steve Bertrand wrote: > > > but may be handy until I become more fluent, > > > as my first instinct is to hit the BACKSPACE > > > > ^H^H^H^H^H^H^H^H^H > > > > ^h key. > > terminal emulation fault. stty erase should fix it, on the > shell that is. > -- > Mel > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
On Tuesday 11 August 2009 16:46:16 Steve Bertrand wrote: > Steve Bertrand wrote: > > but may be handy until I become more fluent, > > as my first instinct is to hit the BACKSPACE > > ^H^H^H^H^H^H^H^H^H > > ^h key. terminal emulation fault. stty erase should fix it, on the shell that is. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
Steve Bertrand wrote: > but may be handy until I become more fluent, > as my first instinct is to hit the BACKSPACE ^H^H^H^H^H^H^H^H^H ^h key. Steve smime.p7s Description: S/MIME Cryptographic Signature
Re: A question for developers
Steve Bertrand wrote: > I'm looking for a new editor. Well, after a two week hiatus from technology, I'm back at work (actually, considering I build a large new deck, being back at work is more of a holiday than being on holidays :) Although it was recommended that I give both Emacs and Vi(m) a try to see which one I prefer, I'm forgoing that, and just sticking with Vim as I can just sense that it suits me. I don't know if this is a Vi or FreeBSD question, so I'll ask here first. In the vim tutor, it is quoted: " NOTE: The letter d will appear on the last line of the screen as you type it. Vim is waiting for you to type w . If you see another character than d you typed something wrong; pressand start over. " ...however, my terminal emulators (Putty, Poderosa) never display anything at the bottom of the screen when I type a command that requires additional input. Am I reading this wrong, or could my emulator be chopping off some of my display (using commands followed by ":" always appear). Having the "d" displayed is largely irrelevant as I can always sense when I've mistyped a char, but may be handy until I become more fluent, as my first instinct is to hit the BACKSPACE key. Is "d" supposed to show up prior to sending it another command? Thanks again for the great feedback and references! Steve smime.p7s Description: S/MIME Cryptographic Signature
Re: A question for developers
>> On Fri, 24 Jul 2009 22:49:10 -0400, >> Steve Bertrand said: S> I'm looking for a new editor. [...] In the last few weeks, I've been S> leaning toward vim. If you've read this far, then I very much welcome S> your feedback. If you're a VIM fan, here are a few examples of what you can do with it: http://www.hcst.net/~vogelke/src/editors/vim/vimrc/ -- Karl Vogel I don't speak for the USAF or my company Chemists wash their hands BEFORE they go to the bathroom. --Tim Thompson, System Administrator/Chemist ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
On Fri, 24 Jul 2009 22:49:10 -0400, Steve Bertrand wrote: > Forgive the verbosity. > > Before anything else, I'd appreciate it if my requirements were actually > read before providing any feedback. I know that there are qualified > persons here to legitimately answer my question, so if a flame war does > ensue, I ask that you refrain from responding. > > I'm looking for a new editor. > > I continue to claim that I am not a programmer, but I'm getting to the > point where my current editor can not do what I need it to do for the > programming I have been doing (90% Perl, a bit of C and the rest is > shell/awk stuff if you want to call that programming). > > Currently, I use "ee". The ONLY reason I have outgrown it, is due to the > fact that I can't find an easy way to change my \t to four chars instead > of eight. Both editors/vim and editors/emacs can do what you describe and a *LOT* more. You should at least try them for a while and see which one of the two fits your style of work better. To get you started by a sneak preview of what they can do, here's a short example of how my .vimrc and .emacs files set options that apply only to C sources. First the ~/.vimrc options: " .vimrc options that apply to all files set softtabstop=8 "how much to indent when TAB is typed set tabstop=8 "how many columns a literal TAB buffer byte indents set textwidth=0"where do we wrap lines? " vim options that apply only to C sources if !exists("format_keramida_cmode") let format_keramida_cmode = 1 " formatting C code autocmd BufNewFile,BufRead *.c,*.h set autoindent showmatch autocmd BufNewFile,BufRead *.c,*.h set formatoptions=tcq2l textwidth=74 autocmd BufNewFile,BufRead *.c,*.h set shiftwidth=8 softtabstop=8 tabstop=8 noexpandtab endif When using VIM, you can get an indentation style of 4 columns that uses only spaces (no TABs at all) by setting `softtabstop=4' and `expandtabs'. Then the ~/.emacs options for GNU Emacs: (defun keramida/cc-mode/setup () "Configure cc-mode and derivatives for KNF style." (interactive) ;; Basic indent is 8 columns (make-local-variable 'c-basic-offset) (setq c-basic-offset 8) ;; Continuation lines are indented 4 spaces (make-local-variable 'c-offsets-alist) (c-set-offset 'arglist-cont 4) (c-set-offset 'arglist-cont-nonempty 4) (c-set-offset 'statement-cont 4) ;; Fill column (make-local-variable 'fill-column) (setq fill-column 74) ;; Indenting to a tab stop always inserts TAB characters (setq indent-tabs-mode t) (setq c-tab-always-indent t)) ;; Install my own hook for C/C++ mode. (add-hook 'c-mode-common-hook 'keramida/cc-mode/setup) When using Emacs, you can get an indentation style that uses 4 columns and only spaces by setting `indent-tabs-mode' to `nil' and then tweaking `c-basic-offset' to 4: (setq indent-tabs-mode nil) (setq c-basic-offset 4) There are _tons_ of other features in both editors. I lean towards Emacs, because I like the way it works, but you can do so many things with both editors that I have been using both for more than 16 years now. I like both of them :-) pgpu5yBCeQGwV.pgp Description: PGP signature
Re: A question for developers
On Sat, 25 Jul 2009 08:49:05 -0600, Chad Perrin wrote: > On Sat, Jul 25, 2009 at 05:21:44PM +0800, Erich Dollansky wrote: > > joe has also the advantage that it behaves differently depending > > under which name your start it. > > What do you mean by "which name"? I'm curious. According to "man joe" (syntax): joe [global-options] [ [local-options] filename ]... jstar [global-options] [ [local-options] filename ]... jmacs [global-options] [ [local-options] filename ]... rjoe [global-options] [ [local-options] filename ]... jpico [global-options] [ [local-options] filename ]... There is specific behaviour for "joe as Wordstar", "joe as Emacs", "restricted joe" and "joe as pico". -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
On Sat, Jul 25, 2009 at 08:46:14AM -0400, Steve Bertrand wrote: > > In years gone by, I've toyed with both Emacs and vi. I'm no stranger to > using CNTL functions frequently (ee), but I've always felt more at home > with vi. I just never put in the initial effort to make it stick. I'm > going to give vim a go. It's what I've been contemplating for quite some > time anyway, and the recent post brought it to the surface. Good luck! -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] Quoth Sean Reifschneider: "If java had real garbage-collection, it would delete most programs before it executed them." pgpkBuqxhGFNA.pgp Description: PGP signature
Re: A question for developers
On Sat, Jul 25, 2009 at 05:21:44PM +0800, Erich Dollansky wrote: > > I use joe, gedit, kate and bluefish. > > All have their week points. > > One advantage of using several in parallel is that you can > configure each to a special need of you and then start the one > which seems to fit best your current task. I find that I get the same benefit by creating multiple configuration files for a single application, and starting it with the configuration I want for the specific task at hand, if that single application with different configurations is better suited to the task at hand than some other application. For instance, I might have a .vim_ruby_rc and a .vim_english_rc, one for programming in Ruby and one for writing articles in English. If I want to have quick, easy startup for each, I might use aliases such as: alias evim 'vim -S .evimrc' alias rvim 'vim -S .rvimrc' If I want a quick way to remind myself what Vim configurations I have available, I might use an alias like this: alias vimlist 'alias|grep vim' I would do this sort of thing because of the unignorable boost to my productivity that I have observed when using Vim, as opposed to other editors. I don't want to give that up for some varying configuration options, using something like nano instead. If, however, you find that a different editor actually suits your needs better for a different purpose, by all means use it for that purpose. I just didn't want to leave these comments without ensuring that it's clear to anyone who doesn't already know it that it's easy to use different configurations for the same editor when using it for different purposes. I do something similar with my mail user agent, and email downloading and sending tools, so that I can work with multiple email addresses without having to use email clients I don't like. > > joe has also the advantage that it behaves differently depending > under which name your start it. What do you mean by "which name"? I'm curious. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] O'Rourke's Circumcision Precept: You can take 10 percent off the top of anything. pgp4uuAT8EAr4.pgp Description: PGP signature
Re: A question for developers
Erich Dollansky wrote: > let me answer very shortly. > [..snip..] > ee is really just useful for very basic editing. But this is the > idea behind ee. I'd like to thank everyone for all of the well thought out, detailed and informative feedback. As far as ee, it's all I've really used for the last 10 years for pretty much everything :) In years gone by, I've toyed with both Emacs and vi. I'm no stranger to using CNTL functions frequently (ee), but I've always felt more at home with vi. I just never put in the initial effort to make it stick. I'm going to give vim a go. It's what I've been contemplating for quite some time anyway, and the recent post brought it to the surface. Thanks everyone. I've saved all of the relevant links, code snips and keystrokes for further perusal. Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
Hi, let me answer very shortly. On 25 July 2009 am 10:49:10 Steve Bertrand wrote: > Forgive the verbosity. > I use joe, gedit, kate and bluefish. All have their week points. One advantage of using several in parallel is that you can configure each to a special need of you and then start the one which seems to fit best your current task. joe has also the advantage that it behaves differently depending under which name your start it. ee is really just useful for very basic editing. But this is the idea behind ee. Erich ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
On Fri, Jul 24, 2009 at 10:49:10PM -0400, Steve Bertrand wrote: > Forgive the verbosity. > > Before anything else, I'd appreciate it if my requirements were actually > read before providing any feedback. I know that there are qualified > persons here to legitimately answer my question, so if a flame war does > ensue, I ask that you refrain from responding. [snip] What you describe as your requirements sounds exactly like vi, or some variant of it -- the most popular of which is Vim. FreeBSD comes with nvi by default, though, and if you find you don't care about Vim's additional features, you may want to use that instead. Note that nvi doesn't support syntax highlighting though, last I checked. I know some people might read your list of requirements and claim that emacs is as good a fit as vi, but beg to differ for at least two specific reasons: 1. You mentioned wanting to be able to move around easily with a single keystroke. The keystroke count for various operations tends to be slightly greater in emacs than in vi. 2. You mentioned wanting to stay close to home row. The truth is that vi and emacs are almost precisely on par here, for the most part, but I think that the key chording requirements of common emacs operation does cause the fingers to stray from home row on a QWERTY keyboard a bit more than vi's tendency to stick to single-key commands a lot more. It's just my good luck that I happen to prefer vi/Vim over emacs myself, while your requirements also seem to favor vi/Vim. I wrote an introduction to productive use of Vim a while back in my personal Weblog. It is most emphatically *not* a tutorial -- it doesn't tell you what commands you need to know to use it or give you tips and tricks for getting specific things done, really. What it does is discuss in very general terms useful approaches to doing things like starting Vim, saving and exiting while using it, taking advantage of the vi modal editing paradigm, and learning more about it over time. It's sort of a lesson in learning how to use Vim, rather than a direct lesson in how to use it, if that makes any sense. Without further ado, here it is: http://sob.apotheon.org/?p=981 I hope that helps. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] Quoth Larry Wall: "It's more important to be a good driver than to have seven feet of sponge rubber all around your car." pgpqAfmiP1qLO.pgp Description: PGP signature
Re: A question for developers
On Fri, 24 Jul 2009 22:49:10 -0400, Steve Bertrand wrote: > I'm looking for a new editor. I went on a similar journey, and I don't know if I'm already where I want to be, but maybe my path is helpful to you. > My desires/don't mind: > > - easily set tab width mcedit: PF9, Options, General joe:^TD > - fingers near home row Both. > - I'm competent/comfortable with CTRL, SHFT etc Both. Especially joe supports the very comfortable and powerful control codes (^KB/K/M/C, ^KF/^L). > - *very* quick basic movements within a file (preferably a single > keyboard gesture will pg-up/dn, end of line, start of line, top, bot, > erase line, cp line, insert line etc) Again, both mcedit and joe support the basic functions of the keyboard's navigation keys, and anything "more advanced" is done through key combinations that are "obvious". If cursor keys are absent (maybe due to defective termcap or crappy implementation on "Windows" program), joe has a simple Ctrl+character key for every movement. > - smooth copy/paste with a mouse if I want to transfer from devel box to > my workstation, and back into a different window Can't tell, never needed. > - syntax highlighting (opening/closing braces/brackets/parens) would be > really nice, but since my win32 client seems black/white, I think this > is a pipe dream. I can easily live without this. As a matter of fact, I > negate this statement Check for the terminal type settings in your "Windows" client. $TERM like xterm or xterm-color supports color. According to the requirement, mcedit and joe have builtin syntax highlighting. Both can be reconfigured if intended quite easily I have done this to mcedit's colors because I really couldn't stand them. :-) > - simple in-editor search/replace would be a nice-have (especially if it > either understood everything as text, or comprehended Perl-type regexp Yes, mcedit has this, PF4, and joe has ^KF+R and ^L. > - be able to have multiple files open simultaneously for editing, and an > easy way to flip back and forth (a virtual 'tab' system, if you please) This is something mcedit can't, but joe can; it employs ^KE / ^KR for loading (with listing and name completition), and ^KN for switching between them. Note that each file edited can have a separate (!) edit buffer / marker that can be changed on both (!) ends and even be edited while (!) being selected. > Honestly, the only reason I want to switch is because I want a four char > tab...really. joe: ^TD8. You can, however, set the tab character to any width you want. There are additional tools that allow you to transform tabs into spaces and vice versa, and to "resize spaced tabs". > I don't want/need an excessive amount of features, just > something that will just work. Just try mcedit (installed by the Midnight Commander's port) and joe. I think joe is what you want, but you need to try it and find out for yourself. Use it's help, ^KH, and Meta-, and Meta-. to browse help pages. ^C to abort, ^KX to save and exit. Oh yes, and because I may assume that you don't have Meta keys, use Esc , and Esc . for this. :-) > In the last few weeks, I've been leaning toward vim. Yes, vim isn't bad, but the magic of the vi-related editors never really opened up to me. But I know that vim has syntax highlighting and (nearly?) every feature you required. > If you've read this far, then I very much welcome your feedback. I hope it will help you on your journey, Steve. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: A question for developers
On Friday 24 July 2009 18:49:10 Steve Bertrand wrote: > Forgive the verbosity. Forgiven, yet snipped ;) > My desires/don't mind: > > - easily set tab width See securemodelines.vim below sig. Put in $LOCALBASE/share/vim/vim72/plugin. And the modeline below in C-style comments, within the first or last 5 lines of a file will set the TabStop to 4, will use 4 for ShiftWith (Number of spaces to use for each step of (auto)indent.), set the TextWidth to 78, will NOt ExpandTabs to spaces, enable AutoIndent if syntax is recognized. /* * vim: ts=4 sw=4 noet tw=78 ai */ Additionally you want to copy $LOCALBASE/share/vim/vim72/vimrc_example.vim to ~/.vimrc so you're not stuck in vi compatible mode. > - fingers near home row Home/End works, as well as ctrl-a/crtl-e in edit mode. > - I'm competent/comfortable with CTRL, SHFT etc Ctrl-R is redo, Ctrl-L refresh screen, shift-; aka : activates command line, some useful ones: :r /foo/bar Read file /foo/bar into current position :r!make -C /usr/ports/editors/vim -V MAINTAINER Read output of command into current position (this particular one is handy for send-pr) :set paste :set nopaste Turn off/on auto indenting, so that the OS/Desktop buffer can be pasted unmodified. :split Split current file into two windows, switchable with two times ctrl-w :split ../include/foo.h Split current file into two windows, where the top one now loads ../include/foo.h :vsplit Split windows vertically, rather then horizontally Split is repeatable and will keep adding virtual windows. Use :close or :quit to close a window. > - *very* quick basic movements within a file (preferably a single > keyboard gesture will pg-up/dn, end of line, start of line, top, bot, > erase line, cp line, insert line etc) pg-up/dn, works $, for EOL, ^ for SOL gg for top of file, G for EOF dd for erase line, or S for erase and insert ("Substitute") yy for yank line, I for insert SOL, A for insert EOL v for visual mode, which allows selecting regions to do "stuff" with. > - smooth copy/paste with a mouse if I want to transfer from devel box to > my workstation, and back into a different window It's turned on by default in .vimrc, but I turned it off cause Konsole allows me to copy/paste to my desktop. By default vim uses it's own clipboard, which means it's limited to current instance or requires closing of vim, so that the new instance reads the clipboard contents from ~/.viminfo. If your client doesn't copy/paste smoothly, this might be an issue. > - syntax highlighting (opening/closing braces/brackets/parens) would be > really nice, but since my win32 client seems black/white, I think this > is a pipe dream. I can easily live without this. As a matter of fact, I > negate this statement Syntax highlighting depends on what your client can support and what terminal emulation you're advertising. The default .vimrc mentioned above respects $TERM and checks it's termcap for color support. So, this depends more on how much time you want to spend figuring out why your terminal emulation doesn't support colors. Also, the default assumed background is light, if you're really using a dark background (white on black terminal), you will want to add: set bg=dark to .vimrc. The used colorscheme then changes accordingly. > - simple in-editor search/replace would be a nice-have (especially if it > either understood everything as text, or comprehended Perl-type regexp :%s/search/replace/g replaces all occurrences in a file, using a dialect of basic re. You will want to read :help sub-replace-special and :help pattern. > - be able to have multiple files open simultaneously for editing, and an > easy way to flip back and forth (a virtual 'tab' system, if you please) ctrl-w ctrl-w you'll get used to. To use securemodelines.vim, put in .vimrc: set modelines=0 let g:secure_modelines_allowed_items = [ \ "textwidth", "tw", \ "softtabstop", "sts", \ "tabstop", "ts", \ "shiftwidth", "sw", \ "expandtab", "et", "noexpandtab", "noet", \ "filetype","ft", \ "foldmethod", "fdm", \ "readonly","ro", "noreadonly", "noro", \ "backup", "bkp", "nobackup", "nobkp", \ "autoindent", "ai", \ "syntax", "syn" \ ] -- Mel " vim: set sw=4 sts=4 et ft=vim : " Script: securemodelines.vim " Version: 20070518 " Author: Ciaran McCreesh " Homepage: http://ciaranm.org/tag/securemodelines " Requires: Vim 7 " License: Redistribute under the same terms as Vim itself " Purpose: A secure alternative to modelines if &compatible || v:version < 700 finish endif if (! exists("g:secure_modelines_allowed_items")) let g:secure_modelines_allowed_items = [ \ "textwidth", "tw", \ "softtabstop", "sts"
A question for developers
Forgive the verbosity. Before anything else, I'd appreciate it if my requirements were actually read before providing any feedback. I know that there are qualified persons here to legitimately answer my question, so if a flame war does ensue, I ask that you refrain from responding. I'm looking for a new editor. I continue to claim that I am not a programmer, but I'm getting to the point where my current editor can not do what I need it to do for the programming I have been doing (90% Perl, a bit of C and the rest is shell/awk stuff if you want to call that programming). Currently, I use "ee". The ONLY reason I have outgrown it, is due to the fact that I can't find an easy way to change my \t to four chars instead of eight. My normal work environment consists of a Windows XP workstation in a dual-monitor setup. I normally use Poderosa (a tabbed SSH client) to communicate with my work. It is not uncommon for me to have two instances of the SSH client running, with multiple tabs open in each one. When I am developing, one monitor displays the file I'm coding in, and the other displays a screen in which I can run the program. I know what my options are, and I'm willing to follow a learning curve. However, I'm looking for valuable input from those who understand what I'm looking for so I can hone in on specifics: My desires/don't mind: - easily set tab width - fingers near home row - I'm competent/comfortable with CTRL, SHFT etc - *very* quick basic movements within a file (preferably a single keyboard gesture will pg-up/dn, end of line, start of line, top, bot, erase line, cp line, insert line etc) - smooth copy/paste with a mouse if I want to transfer from devel box to my workstation, and back into a different window - syntax highlighting (opening/closing braces/brackets/parens) would be really nice, but since my win32 client seems black/white, I think this is a pipe dream. I can easily live without this. As a matter of fact, I negate this statement - simple in-editor search/replace would be a nice-have (especially if it either understood everything as text, or comprehended Perl-type regexp - be able to have multiple files open simultaneously for editing, and an easy way to flip back and forth (a virtual 'tab' system, if you please) Honestly, the only reason I want to switch is because I want a four char tab...really. I don't want/need an excessive amount of features, just something that will just work. In the last few weeks, I've been leaning toward vim. If you've read this far, then I very much welcome your feedback. Thanks, Steve smime.p7s Description: S/MIME Cryptographic Signature