XML

kent logo

CO538 Anonymous Questions and Answers Keyword Index

This page provides a keyword index to questions and answers. Clicking on a keyword will take you to a page containing all questions and answers for that keyword, grouped by year.

To submit a question, use the anonymous questions page. You may find the keyword index and/or top-level index useful for locating past questions and answers.

Keyword reference for gvim

2004

Question 84 (2004):

vim question: how does one indent multiple lines at once ?

Answer 84:

From command mode, use "shift + V" to start `visual line'. Move the cursor to the end of the block you want to indent, then "shift + >" to indent. You can repeat the indent with "." (as you can repeat any other command).

If you're using the Kent Vim extensions and GVim:

Select relevant lines. Indent with "tab" or "alt + right-arrow". Outdent with "shift + tab" or "alt + left". This also works for the current line (without having selected it). Exception: in insert mode "tab" inserts a "tab" (as expected). In normal mode or if text is selected, "tab" indents. The other shortcuts work in any case.

Keywords: vim , gvim

2003

Question 99 (2003):

Hi. I have just installed Mandrake 9.2 and downloaded `kroc' & `gvim'. Is there a detailed readme suited to a non-unix person giving clear instructions on how to get an `.occ' file compiling using KRoC ? Thanks.

Answer 99:

When you install KRoC on Linux (running the `./build' script), it outputs a message directing you to some initial documentation:

    doc/essentially-kroc.txt

Compiling from the command-line is relatively simple. After you've source'd the KRoC setup file (that modifies your `PATH' environment variable):

    source /path/to/kroc/bin/setup.sh

(use `setup.csh' if you use csh or tcsh, although I'd stronly recommend bash -- that is probably the default).

To compile an occam file:

    kroc q7.occ -lcourse

As for gvim, install the Kent Vim Extensions following the instructions on:

http://www.informatico.de/kent-vim-ext/

Keywords: gvim , linux

2002

Question 23 (2002):

I'm trying to edit question 4 for the assignment but when I open it using 'gvim q4.occ' it opens but is just black and white text and it beeps at me!

Answer 23:

Check the answer to Question 16 (2002). Note: starting work for an assignment the morning that assignment is due is probably not a good strategy ...

Keywords: q4 , gvim


Question 16 (2002):

I have a problem with the folding in GVIM. Before this, I could open and close a folder containing a section of code for a PROC or a whole section of comments based on the curly bracket notation --{{{ and --}}} you provide in your .occ files. Once the block of code is closed, it displays a line of text highlighted in blue with a '+' sign on the left with the code indented and encapsulated under this folder and it also has fold column on the far left.

But now my GVIM program running under Exceed seems to have been saved under different settings and is incapable of displaying this anymore where it was OK before, and now it just displays plain text. I find it much easier if I have the folding capabilities as it is much easier to hide lines of comments and PROC bodies - particularly for occam when there are large amounts of code.

How can I change back to the original settings before and is always displayed every time you open any .occ file without having to add folders manually??

Answer 16:

This problem is caused because /usr/local/work was renamed to /usr/local/courses on raptor. /usr/local/work doesn't exist any longer, i.e. some students' Vim resource files now point to the wrong (non-existing) directory, that's why the folding scripts are not loaded. To solve this, try to run the vim script again. Run:

  /usr/local/courses/co516/vim-setup

and chose option 1 ("Replace old files").

Keywords: vim , gvim , folding

Referrers: Question 23 (2002)

Valid CSS!

Valid XHTML 1.0!

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
Last modified Mon May 20 13:50:27 2013
This document is maintained by Fred Barnes, to whom any comments and corrections should be addressed.