webframp


Joined 2 years ago
Homeworks submitted:
Homework comments:
8
1

About Me

No description provided.

Classes

Learning Vim from the inside

Class status: Established
Role: Student
. 47% complete

Submitted Assignments

Learning Vim from the inside: Lesson 3, HW 4

gf on options.c in README.txt took me to

  • options.c:vimrc_found() called when vimrc or VIMIINIT environment variable is found.

So in theory, vim can read whatever the value of VIMINIT is set to. But typically this is one of .vimrc, .gvimrc, _vimrc or _gvimrc depending on the platform.

  • lid -Sn VIMINIT lists: main.c, options.txt,starting.txt,versoin5.txt
  • vim main.c
  • main.c:command_line_scan(paramp) can affect this since case 'u' or case 'U' can specify an init file.
  • from examining main.c: .exrc or _exrc, or value of EXINIT can also be used.

One neat feature is that if either vimrc or exrc are not owned by the calling user, 'secure' mode is set. Using :h secure in vim tells us:

"When on, ":autocmd", shell and write commands are not allowed in ".vimrc" and ".exrc" in the current directory and map commands are displayed."


webframp 2 years ago
Learning Vim from the inside: Lesson 3, HW 3
  • use vim to create TAGS: done
  • read through the readme: done
  • :help development: read it. #1 point - Read documentation first! Made mental note of vim special functions. Will probably have to check that list again. Assumptions section good to note.
  • :help buffers: read it. vim -o is great, vim -O is even better for my widescreen monitor.

  • :make - gf

  • :make uses the quickfix window, reading error messages from the errorfile or buffer. Inspired by the Manx Aztec C compiler for Amiga, error messages are saved to a file/buffer and jumped to one by one.
  • ex_make()
  • depending on "autowrite" option, changes in current buffer may be written out. If an error file with same name exists it will be deleted. The output of 'makeprg' is saved in the errorfile, which is then read thanks to the setting 'errorformat'
  • eap handles mapping of ex functions. the enum CMD_index defined in ex_cmds.h details the available names codes.

probably a few errors in that list, comments much welcome!


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

Instincts of course say go to the README. but using the tools from the lesson:

$ lid -S newline mailing
mailing        README.txt
runtime/doc/intro.txt
runtime/doc/os_vms.txt
runtime/doc/pi_netrw.txt
runtime/doc/uganda.txt
runtime/tools/efm_filter.txt
runtime/tools/mve.txt

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

Done. I think it's a good idea to make a habit of doing this anytime a lot of new files are added to the filesystem


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

done. Ran mkid in the top level vim/ dir, the more info I have the better.


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

No hiccups once I found the right packages for my distro. I've been a longtime vim user (10+ yrs) but never really dug into the code so this looks to be informative.


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

done

requesting all changes
adding changesets
adding manifests
adding file changes
added 2043 changesets with 16838 changes to 2421 files (+1 heads)
updating to branch default
2257 files updated, 0 files merged, 0 files removed, 0 files unresolved

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

A note for Arch Linux users. id-utils is available via AUR.


webframp 2 years ago