DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default vi editor

Looking for an editor similar to vi, that can produce color text however. I looked at the man pages for vi and concluded that it is not capable.
Reply With Quote
  #2   (View Single Post)  
Old 29th November 2014
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by jjstorm View Post
Looking for an editor similar to vi, that can produce color text...
editors/vim may be what you are looking for if you are wanting something similar to vi. I can vouch for editors/emacs as I use it daily.
Reply With Quote
  #3   (View Single Post)  
Old 29th November 2014
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Quote:
Originally Posted by jjstorm View Post
Looking for an editor similar to vi, that can produce color text however. I looked at the man pages for vi and concluded that it is not capable.
Which "vi"? I was toddler in 1976 but traditional vi coded by Bill Joy had to work around low baud rates. Color was probably the last thing on his mind. Traditional vi was finally released by Caldera in 2002. Solaris version of vi was pretty close to the traditional version which was to be expected since Bill Joy was CTO. For us in BSD world vi is synonymous for nvi which was coded by Keith Bostic to be bug for bug compatible with traditional vi. His starting point was elvis, a vi clone written by Steve Kirkendall. BSD projects continue to use nvi version 1.79 due to licensing differences between Berkeley Database 1.85 and the later versions by Sleepycat Software. nvi is only executable on POSIX/UNIX platforms due to its reliance on the curses/ncurses library.

Other notable clones of vi include vile, infamous VIM and my personal favourite vigor It is worth nothing that traditional vi was the only significant code removed from BSD as a result of ATT vs UC Berkeley board of regents law suit.

The great news coming these days from OpenBSD camp is that OpenBSD has de-facto forked nvi and is cleaning lots of ancient garbage. In some sense the code is diverging in completely opposite direction comparing to infamous VIM. OpenBSD version of nvi is actually shrinking and is now smaller than traditional vi.

Now back to your original question VIM and vile have syntax highlighting but that is not the same thing as colour displaying. I am guessing VIM can display colours, play ninth Beethoven symphony, and even cook for you. A typical GNU software like product.

Last edited by Oko; 29th November 2014 at 07:30 AM.
Reply With Quote
  #4   (View Single Post)  
Old 29th November 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by Oko View Post
Which "vi"?
Certainly jjstorm is talking about vi(1), aka nvi. Which does not (and will not) have color output.

Quote:
Originally Posted by Oko View Post
A typical GNU software like product.
Vim is not affiliated with the GNU project. Nor is Vim licensed under any version or variant of the GPL. However, the Vim license is compatible with the GPL according to the Vim license itself.
Reply With Quote
  #5   (View Single Post)  
Old 29th November 2014
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Quote:
Originally Posted by ibara View Post
Vim is not affiliated with the GNU project. Nor is Vim licensed under any version or variant of the GPL. However, the Vim license is compatible with the GPL according to the Vim license itself.
I didn't say it is GNU software. Note that I used phrase "GNU software like". Actually for many years Vim was adhering to UNIX philosophy. One can literally locate on Vim mailing lists the moment Bram Moolenaar gave up to constant nagging of dissatisfaction users who wanted to add new features to Vim. The rest is history and as we know now Vim can play 9th Beethoven Symphony, cook lunch for you and do many other things commonly found in GNU software.
Reply With Quote
  #6   (View Single Post)  
Old 29th November 2014
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

Quote:
Looking for an editor similar to vi, that can produce color text however
Within the last day I started a Mutt Colors thread about enabling color text not only in Mutt but in Vim/Gvim. You can easily set the foreground color, which ends up being the text color. What is more challenging is to display different categories of text, headers, quotes, tab indents, etc, in different colors.

An easy way to play with this is to install editors/vim. There are multiple version and pkg_add should prompt you to pick the version. Pick the vim-gtk version (aka gvim).

In gvim, under Edit you can choose a color scheme and change it on the fly. For me the on-the-fly change affects the background and foreground. Also search the web for vimrc + colors

Last edited by shep; 29th November 2014 at 05:28 PM.
Reply With Quote
  #7   (View Single Post)  
Old 30th November 2014
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by jjstorm View Post
Looking for an...
When it comes to questions about what applications can be found in the packages/ports system, there are a number of tools users can peruse themselves:
  • The project's CVS tree. The ports tree is not installed by default with installation of the base system. The CVS tree can be installed locally (See Section 5.3.3 of the project's official FAQ for installation instructions...), or it can be studied online at OpenBSD's CVS Web interface. Note that this is the scaffolding used to download application source, & build instructions needed to meet OpenBSD's environment (which may be different than other Unix-like environments...). Nevertheless, some general information can be found in the Makefile's.
  • A third-party Website (not officially affiliated with the OpenBSD project...) can be found at:

    http://openports.se/

    ...which I believe scrapes the CVS tree (& possibly the project's ports-changes@ mailing list ...) for information on what recent changes have been made to the ports tree for -current. The information found on the OpenBSD Ports Website is not necessarily correct for -release & -stable users, & it is generally suspected that the site incorrectly implements scraping, but basic information is most likely okay -- again for users of -current.
  • A better Website alternative is http://ports.su which displays information found in the SQLite database generated from databases/sqlports. This database is generated directly from information found in the CVS tree, & is should be considered correct for -current users. However, how often this site is updated is unknown.
While responders at this site are happy to provide assistance, OpenBSD users should take advantage of the tools/sites which attempt to provide information on what is in the OpenBSD packages/ports system. When these types of questions are asked here at this site, we frequently search through these sites (or CVS tree...) before responding. You can search through the same sources as we do too.
Reply With Quote
  #8   (View Single Post)  
Old 30th November 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

ocicat, a few more things to add to your list:
First is databases/ports-readmes-dancer which is a super awesome and super powerful way to browse ports and their relation to one another (even does reverse dependencies!). The downside is you need to host it on a server of your own and update it from time to time. I'm thinking of hosting one for public consumption in the near future. But it gives you everything and I do mean everything: pkg/DESCR, COMMENT, dependencies, the whole nine yards and then some.

Second, pkg_info -Q. Downside is you have to know what you're looking for in advance because it matches your query to PKGNAMEs. But it's really fast.

Lastly, http://portroach.openbsd.org has info on all ports. But it is organized by port maintainer (as it is a tool for us to keep track of changing upstreams). For example, to see all of my ports:
http://portroach.openbsd.org/brian%2...sd.org%3E.html
Clicking on a port name will bring you to its CVSWeb entry. This is likely the closest to "official" as you're going to get.
Reply With Quote
  #9   (View Single Post)  
Old 30th November 2014
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by ibara View Post
ocicat, a few more things to add to your list:
Excellent points! Thanks for bringing these up!

Reply With Quote
Old 30th November 2014
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Some people find useful databases/pkglocatedb.
Reply With Quote
Old 30th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default

Quote:
Originally Posted by ibara View Post
ocicat, a few more things to add to your list:
First is databases/ports-readmes-dancer which is a super awesome and super powerful way to browse ports and their relation to one another (even does reverse dependencies!). The downside is you need to host it on a server of your own and update it from time to time. I'm thinking of hosting one for public consumption in the near future. But it gives you everything and I do mean everything: pkg/DESCR, COMMENT, dependencies, the whole nine yards and then some.

Second, pkg_info -Q. Downside is you have to know what you're looking for in advance because it matches your query to PKGNAMEs. But it's really fast.

Lastly, http://portroach.openbsd.org has info on all ports. But it is organized by port maintainer (as it is a tool for us to keep track of changing upstreams). For example, to see all of my ports:
http://portroach.openbsd.org/brian%2...sd.org%3E.html
Clicking on a port name will bring you to its CVSWeb entry. This is likely the closest to "official" as you're going to get.
The first two links in green appear to be broken. Thank you very much for the others. I added them to my openbsd bookmarks and will be reviewing them.
Reply With Quote
Old 30th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default

Thank-You all for your response to this thread. As I was aware of the some of the information provided, I still have yet to implement a lot of it. I have the ports tree installed, which I downloaded from ftp, installed, and then updated from anonCVS server, (with the special command required if you initially fetched from CD or different source, (by adding -d [cvsroot] to the string)), however still have not gotten around to searching or compiling anything from it.

The main reason for starting this thread was to find an editor that will allow me to format text on the fly, and by going back and highlighting it. Color is the most important, however, all other text formatting is important as well (e.g bold, italic, underline...) The editor will have to work with both linux and openbsd. I am going to create a shared folder on the host machine (ubuntu), that will be able to be accessed by the guest OS (openbsd) on a machine over ssh.

Emacs seems to fit the bill. How would I accomplish the text formatting that I want to accomplish? Would it be through macros or assigning certain functions to keystrokes? After very briefly skimming over some of the manuals and tutorials, I am still uncertain. I am not asking for anyone to tell me exactly how to do it, rather, give me an idea or overview of how it's done, so I know what section of the manuals, tutorials, and books to read. Is there another editor that might work better for me?

thanks again
Reply With Quote
Old 30th November 2014
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by jjstorm View Post
I have the ports tree installed...
If you are installing the ports tree to study it, that is fine.

...but if you are installing the ports tree build applications, this may be overkill as there is no difference between applications built locally & applications installed through the pre-built packages made available by the project. There are exceptions, but for the vast majority of OpenBSD users, installing packages from the various mirrors is preferrable.

This is especially true for -release & -stable users.

In the -current world, there are times due to library changes & changes in the ports system configuration which require local building due to the unavailability of compatible packages.
Quote:
The main reason for starting this thread was to find an editor that will allow me to format text on the fly, and by going back and highlighting it. Color is the most important, however, all other text formatting is important as well (e.g bold, italic, underline...)
If you are wanting to retain formatting, use of a text editor may not be your best choice. Libreoffice (editors/libreoffice), may be a better choice. This is an Microsoft Office-like clone, & will retain any highlighting that users set in text. Be aware that Libreoffice is resource-hungry, so having a lot of RAM is advisable.
Reply With Quote
Old 1st December 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by jjstorm View Post
The first two links in green appear to be broken.
Notably because they're not links.
One is a port, the other is a command (try running pkg_info -Q from your terminal).
Btw, to get the green text, wrap the text in the file BBCode blocks.
Reply With Quote
Old 1st December 2014
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

Quote:
Notably because they're not links.
One is a port, the other is a command (try running pkg_info -Q from your terminal).
Btw, to get the green text, wrap the text in the file BBCode blocks.
Actually this forum has specific BBCode blocks for commands and for OpenBSD ports. The "other" forum is very rigid about proper BBCodes. If you spend any time at the "other" forum, you will be browbeaten until you comply.
Reply With Quote
Old 1st December 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

I have no idea what the "other" forum is but if it's the FreeBSD forums I have quite literally zero reason to ever be there.
Reply With Quote
Old 1st December 2014
jb_daefo jb_daefo is offline
Spam Deminer
 
Join Date: May 2008
Posts: 303
Default

FWIW, The default FreeBSD forum is more forgiving/easy with code blocks, it seems to me, since migrating to the new forum software...
__________________
FreeBSD 13-STABLE
Reply With Quote
Old 1st December 2014
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

Quote:
Originally Posted by jjstorm View Post
Looking for an editor similar to vi, that can produce color text however. I looked at the man pages for vi and concluded that it is not capable.
Have you tried Geany? I used it in the past. It has multi-colour text, but since it is lighter in terms of resource use than editors like Emacs, it probably has significantly fewer features. May or may not be what you are looking for, and it is in Packages.
Reply With Quote
Old 1st December 2014
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

To finally answer your question

Quote:
Looking for an editor similar to vi, that can produce color text
editors/vim, all flavors including vim-gtk, have color syntax highlighting. In OpenBSD gvim the menu entries are to turn syntax highlighing on and for me to select automatic. Likely the option can be set in ~./gvimrc

A indepth tutorial is here.

Last edited by shep; 1st December 2014 at 04:25 PM.
Reply With Quote
Old 1st December 2014
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by jjstorm View Post
The main reason for starting this thread was to find an editor that will allow me to format text on the fly, and by going back and highlighting it. Color is the most important, however, all other text formatting is important as well (e.g bold, italic, underline...) The editor will have to work with both linux and openbsd. I am going to create a shared folder on the host machine (ubuntu), that will be able to be accessed by the guest OS (openbsd) on a machine over ssh.
Given the above explanation, it does not appear that color syntax highlighting is the fundamental goal described by jjstorm (However, syntax highlighting was my initial thought too given his explanation...).
Quote:
How would I accomplish the text formatting that I want to accomplish?
This tends to confirm in my mind that jjstorm is focusing most on presentation -- how the document will appear when finished with lots of embellishments. While a few text editors can do this, adding formatting attributes may in the long run be clunky in the strict text environment. Instead of all of us guessing, we need to ask jjstorm to further clarify his desired end result.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
preserving editor files now takes a much longer time daemonfowl OpenBSD General 1 2nd November 2013 06:40 PM
JavaScript-based CodeMirror editor reaches version 3.0 J65nko News 0 28th December 2012 01:20 PM
Bluefish Editor 2.2.0 enhanced with new syntax scanning abilities J65nko News 0 28th November 2011 01:53 PM
Pixel Image Editor ninjatux FreeBSD Ports and Packages 2 11th January 2009 06:38 PM
Php editor for FreeBSD? daemonFromHeaven FreeBSD Ports and Packages 12 12th September 2008 09:03 PM


All times are GMT. The time now is 11:11 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick