Student ID : 401171593
./build.sh
bin/command_exec.out
bin/viim.out
file address should start with /
createfile –file <file name and address>
creates a new file in the given address.
insertstr –file <file name> –str <str> —pos <line no>:<start position>
inserts str in the given position.
cat –file <file name>
prints contents of the given file.
removestr –file <file name> –pos <line no>:<start position> -size <number of characters to remove> -f -b <forward or backward>
removes text in the given range.
copystr –file <file name> –pos <line no>:<start position> -size <num-ber of characters to copy> -f -b <forward or backward>
copies text in the given range to clipboard.
cutstr –file <file name> –pos <line no>:<start position> -size <number of characters to cut> -f -b <forward or backward>
cuts text in the given range to clipboard.
pastestr –file <file name> –pos <line no>:<start position>
pastes clipboard to given position.
undo –file <file>
used to undo changes applied to the chosen file using the tool.
tree <depth>
draws file tree of root directory up to given depth. if depth is -1 then it draws entire file tree.
compare <file1> <file2>
compares given files.
auto-indent <file>
fixes indentation of c-like codes.
grep [-c | -l] –str <pattern> –files [<file1> <file2> <file3> …]
searches string in given files and prints its locations.
only counts occurences.
only prints containing filenames.
find –str <str> –file <file name> [-count | -at <nth occurence> | -all] -byword
searches string in the given file and prints its location.
only counts occurences.
prints the nth occurence location.
prints all occurences.
prints location based on word count instead of character count.
replace –str1 <str> –str2 <str> –file <file name> [-at <num> | -all]
replaces first str1 occurence with str2.
replaces nth str1 occurence with str2.
replaces all str1 occurences with str2.
mostly similar to the original vim.
:quit
closes the editor.
:save
saves current buffer to already specified file path.
:saveas <path>
saves current buffer to the file at the given path.
:open <path>
opens the file at the given path.
/<pattern>
finds and highlightes occurences of pattern in current buffer.
:replace –str1 <str> –str2 <str> [-at <num> | -all]
replaces first str1 occurence with str2.
replaces nth str1 occurence with str2.
replaces all str1 occurences with str2.
fixes indentation of the current buffer using '=' key.
:name_of_command
you can use any command from the previous part in this format and the result of them apear inside the editor.