dioltas


Joined 2 years ago
Homeworks submitted:
Homework comments:
6
4

About Me

No description provided.

Classes

Learning Vim from the inside

Class status: Established
Role: Student
. 35% complete

Submitted Assignments

Learning Vim from the inside: Lesson 3, HW 3

The first few steps were ok.

:make tags didn't work, first because I wasn't in the src directory.

then once in src/ it wouldn't work because ctags wasn't installed.

so I installed it by doing sudo pacman -Sy ctags.

It worked ok then.

I read through the readme, and :help development. I read about half of the :help buffers.

Tried out a few ctrl-]'s and gf's too.


I opened quickfix.c by placing the cursor on it and typing gf. Had a look through it, couldn't make much sense of it though! Couldn't find the make function either...

So I read up on the :make command, and if I understand correctly it's for compiling from within vim. It compiles what you specify by consulting a make file and if there is an error it shows it and places the cursor on the line of code that caused the error.

I'm only half guessing here though tbh.

So then to find the C routine that implements it, in the README.txt it says

The ":" commands are listed in ex_cmds.h.

So I jumped to ex_cmds.h using gf. I did /make to find make. Then I used ctrl-] to jump to ex_make.

I haven't been able to make much sense of ex_make(eap) yet. The function is used for ":make", ":lmake", ":grep", ":lgrep", ":grepadd", and ":lgrepadd" according to the comment.

And at the start there is a switch statement to figure out which is being used.

I think when :make is run it saves the current buffers to file. If there is an error then it should put the cursor on the line of the error I think. Not sure what other effects it has.

I did a few different lid -Sn eap commands to try and figure out what eap was about. Couldn't really figure it out. I'd guess that it's the location of the command / filename in memory as it's the only argument passed to a lot of the functions.


dioltas 2 years ago
Learning Vim from the inside: Lesson 3, HW 2

Ok, so I executed,

lid -S newline mailing\*

which listed some files in runtime/ and README.txt.

I opened some of the files, didn't find what i was looking for, then tried opening README.txt, and down at the bottom I found the 5 mailing lists, yay!

Hope that's the right one!


dioltas 2 years ago
Learning Vim from the inside: Lesson 3, HW 1

Just used the ./configure, make method.

When I run vim it gives an error,

Error detected while processing /home/(me)/.vimrc:

line 1:

E484: Can't open file /usr/local/share/vim/syntax/syntax.vim

I checked and that file doesn't exist, so I'm thinking that on my system (Arch) that it's just kept somewhere else as my normal vim gives no problem and syntax highlighting works fine.

If I had done make install, I suppose it would have put those files where they were expected to be.

Other than that no problems.


dioltas 2 years ago
Learning Vim from the inside: Lesson 2, HW 1

Running Archlinux.

Had a look at the GNU guide, and messed around a bit with the commands. Looked at this guide too: http://www.math.utah.edu/docs/info/mkid_toc.html

I also used "command --help" to find out about the commands.

Just ran mkid -v, in the vim source folder to make the identifier database. Seemed to scan through all the files ok. Used -v to enable verbose mode, so I could see what was happening.

If I understand it right it found all new tokens in the first file, and then as it went through the rest it found less new tokens. The last file tutor.pl had 0 new tokens, the second last shtags.pl had 18% new tokens (new = 17/92 = 18%) I'm just guessing here, so could be wrong. It lists the number of files scanned and number of tokens etc at the bottom. I don't understand all of the info it gives.

I then ran

$ fnid -S newline \*.txt

to list all the textfiles, which it seemed to do ok. The -S newline tells it to put a newline between each entry. I got this wrong the first time by forgetting to escape the *, which made it only list the .txt files in my current directory as the * was expanded by bash.

I ran

$ fid ./src/charset.c ./src/buffer.c

to list the common tokens between both files, which it did.

Then finally I ran

$ lid -S newline skiptowhite*

and it listed the files which had skiptowhite, followed by the files that had skiptowhite_esc.

Please correct me if I got any of this wrong.

Edit: Don't think I was supposed to post the output of all my commands! :D


dioltas 2 years ago
Learning Vim from the inside: Lesson 1, HW 3

Just ran the commands! :D

sudo pacman -Sy mercurial
yaourt -S idutils
hg clone https://vim.googlecode.com/hg/ vim

dioltas 2 years ago