unix philosophy text editors ides
play

Unix Philosophy, Text Editors, IDEs Assignment In-Class Writing - PowerPoint PPT Presentation

Unix Development Data Structures Lab: Comp Sci 1585 Unix Philosophy, Text Editors, IDEs Assignment In-Class Writing code Building / Running Code::Blocks Environments Integrated philosophy Kate Notepad++ Atom Emacs Vim nano Text


  1. Unix Development Data Structures Lab: Comp Sci 1585 Unix Philosophy, Text Editors, IDEs Assignment In-Class Writing code Building / Running Code::Blocks Environments Integrated philosophy Kate Notepad++ Atom Emacs Vim nano Text editors X-forwarding What is text? Tools for Computer Scientists

  2. Unix Emacs What is text? 3 X-forwarding 4 Text editors nano Vim Atom Unix philosophy Notepad++ Kate 5 Integrated Development Environments Code::Blocks Building / Running Writing code 6 2 1 philosophy Notepad++ What is text? X-forwarding Text editors nano Vim Emacs Atom Kate Outline Integrated Development Environments Code::Blocks Building / Running Writing code In-Class Assignment In-Class Assignment

  3. Unix philosophy accomplish larger tasks. underlying format: the line-oriented, plain text fjle” to universal interface. Excerpts from the Unix philosophy Assignment In-Class Writing code Building / Running Code::Blocks Environments Development Integrated Kate Notepad++ Atom Emacs Vim nano Text editors X-forwarding What is text? https://en.wikipedia.org/wiki/Unix_philosophy • Write programs to handle text streams, because that is a • Combine “small, sharp tools” and the use of “common • Store data in fmat text fjles

  4. Unix In-Class well as to port (i.e., modify) them to new platforms (i.e., other for humans to study, correct, improve and extend such fjles as easily interfaced with humans. The latter means that it is easy incompatible binary formats and because such fjles can be to the diffjculty that they would have if each used mutually each other in the form of text outputs and inputs, in contrast interface; that is, it can allow programs to easily interact with confjguration fjles. This is because plain text is a universal possible for the inputs and outputs of programs and for fjles (which are not fully human readable) to the extent human readable alphanumeric characters) rather than binary Another major tenet of the philosophy is to use plain text (i.e., Excerpts from the UNIX philosophy Assignment Writing code philosophy Building / Running Code::Blocks Environments Development Integrated Kate Notepad++ Atom Emacs Vim nano Text editors X-forwarding What is text? combinations of operating systems and hardware).

  5. Unix diffjcult to hook the programs together. Text streams are to Unix Under classic Unix, as many programs as possible are written as simple fjlters, which take a simple text stream on input and process it into another simple text stream on output. Despite popular mythology, this practice is favored not because Unix programmers hate graphical user interfaces. It’s because if you don’t write programs that accept and emit simple text streams, it’s much more tools as messages are to objects in an object-oriented setting. The Unix tradition strongly encourages writing programs that read and simplicity of the text-stream interface enforces the encapsulation of the tools. More elaborate forms of inter-process communication, such as remote procedure calls, show a tendency to involve programs with each others’ internals too much. To make programs composable, make them independent. A program on one end of a text stream should care as little as possible about the program on the other end. It should be made easy to replace one end with a completely difgerent write simple, textual, stream-oriented, device-independent formats. Excerpts from the UNIX philosophy philosophy Notepad++ What is text? X-forwarding Text editors nano Vim Emacs Atom Kate Assignment Integrated Development Environments Code::Blocks Building / Running Writing code In-Class implementation without disturbing the other.

  6. Unix Emacs What is text? 3 X-forwarding 4 Text editors nano Vim Atom Unix philosophy Notepad++ Kate 5 Integrated Development Environments Code::Blocks Building / Running Writing code 6 2 1 philosophy Notepad++ What is text? X-forwarding Text editors nano Vim Emacs Atom Kate Outline Integrated Development Environments Code::Blocks Building / Running Writing code In-Class Assignment In-Class Assignment

  7. Unix philosophy be using one a lot, so you should know how to use your plain text because it is easy for developers to understand. data, or EBCDIC encoded data…) What is ‘text’? Assignment In-Class Writing code Building / Running Code::Blocks Environments Development Integrated Kate Notepad++ Atom Emacs Vim nano Text editors X-forwarding What is text? editor of choice. • ‘Plain text’ is ASCII-encoded data. (Or UTF-8 encoded • Most programming languages and network protocols use • Text editors are just tools for editing plain text fjles. You’ll

  8. Unix Integrated Assignment In-Class Writing code Building / Running Code::Blocks Environments Development Kate philosophy Notepad++ Atom Emacs Vim nano Text editors X-forwarding What is text? ASCII

  9. Unix Development You are responsible for submitting all text and source fjles you ASCII Assignment In-Class Writing code Building / Running Code::Blocks Environments Integrated philosophy Kate Notepad++ Atom Emacs Vim nano Text editors X-forwarding What is text? will submit in the entire class encoded UTF-8, Unix delimited.

  10. Unix Emacs What is text? 3 X-forwarding 4 Text editors nano Vim Atom Unix philosophy Notepad++ Kate 5 Integrated Development Environments Code::Blocks Building / Running Writing code 6 2 1 philosophy Notepad++ What is text? X-forwarding Text editors nano Vim Emacs Atom Kate Outline Integrated Development Environments Code::Blocks Building / Running Writing code In-Class Assignment In-Class Assignment

  11. Unix Environments $ ssh -X <hostname> like normal. screen. programs. X forwarding Assignment In-Class Writing code philosophy Code::Blocks Building / Running Development X-forwarding Kate Notepad++ Atom Emacs Vim nano Integrated Text editors What is text? • X-windows is Linux’s system for displaying graphical • X server: Program that manages what is displayed on the • X client: Program that wants to display something. • Windows: Run Xming to start the server, then use PuTTY • Mac: Install X11.app, then use $ ssh -X <hostname> • Linux: You are already running an X server! Just use • Use $ xeyes to check if X forwarding is set up correctly.

  12. Unix Emacs What is text? 3 X-forwarding 4 Text editors nano Vim Atom Unix philosophy Notepad++ Kate 5 Integrated Development Environments Code::Blocks Building / Running Writing code 6 2 1 philosophy Notepad++ What is text? X-forwarding Text editors nano Vim Emacs Atom Kate Outline Integrated Development Environments Code::Blocks Building / Running Writing code In-Class Assignment In-Class Assignment

  13. Unix Emacs What is text? 3 X-forwarding 4 Text editors nano Vim Atom Unix philosophy Notepad++ Kate 5 Integrated Development Environments Code::Blocks Building / Running Writing code 6 2 1 philosophy Notepad++ What is text? X-forwarding Text editors nano Vim Emacs Atom Kate Outline Integrated Development Environments Code::Blocks Building / Running Writing code In-Class Assignment In-Class Assignment

  14. Unix Environments Most importantly: Full command examples: First part of the command: GNU nano Assignment In-Class Writing code philosophy Code::Blocks Building / Running Development X-forwarding Kate Notepad++ Atom Emacs Vim nano Text editors Integrated What is text? • ^- is Ctrl • M- is Alt • “Write out” (save): ^- O • Quit: ^- X • Undo: M-U • Redo: M-E • Help: ^- G

  15. Unix Emacs What is text? 3 X-forwarding 4 Text editors nano Vim Atom Unix philosophy Notepad++ Kate 5 Integrated Development Environments Code::Blocks Building / Running Writing code 6 2 1 philosophy Notepad++ What is text? X-forwarding Text editors nano Vim Emacs Atom Kate Outline Integrated Development Environments Code::Blocks Building / Running Writing code In-Class Assignment In-Class Assignment

  16. Unix Development together into complex ones Vim Terminology: vim.org Assignment In-Class Writing code Building / Running Code::Blocks philosophy Environments Integrated Kate Notepad++ Atom Emacs Vim nano Text editors X-forwarding What is text? • Bufger: Opened fjle • Window: Visual section displaying a bufger • (Atom borrowed this terminology from vim!) • Composability: You can connect simple commands • $ vimtutor can teach you some basic vim stufg Tip: $ :set mouse=a

  17. Unix In-Class • • • R • • • • • • philosophy c Modes: Keys do difgerent things in difgerent modes Assignment • Writing code nano X-forwarding Vim What is text? Emacs Building / Running Atom Notepad++ Kate Integrated Development Environments Code::Blocks Text editors • Normal: Navigation/commands. Esc , Ctrl + • Insert: Writing text. i : Insert at cursor I : Insert at beginning of line a : Insert after cursor (append at cursor) A : Insert at end of line (Append to line) o : Insert on new line below cursor O : Insert on new line above cursor c : Change text at cursor • Replace: Overwriting text. • Visual: Selecting text. v : Character select V : Line select Ctrl + v : Block select

Recommend


More recommend