Difference between revisions of "Gedit-Text-Editor/C2/Handling-Tabs/English"
(Created page with "'''Title of script''':''' Handling tabs in gedit Text editor''' '''Author: Nirmala Venkat''' '''Keywords:''' Add tab, Move tab, Reorder tab, Close tab, Side panel, Insert li...") |
|||
(One intermediate revision by one other user not shown) | |||
Line 7: | Line 7: | ||
{| style="border-spacing:0;width:17.39cm;" | {| style="border-spacing:0;width:17.39cm;" | ||
|- style="background-color:#c0c0c0;border:1pt solid #000000;padding:0.097cm;" | |- style="background-color:#c0c0c0;border:1pt solid #000000;padding:0.097cm;" | ||
− | || | + | || '''Visual Cue''' |
| style="color:#000000;" | '''Narration''' | | style="color:#000000;" | '''Narration''' | ||
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 1: |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Welcome to the ''' Spoken Tutorial''' on ''' Handling tabs in gedit Text editor.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 2: |
− | + | Learning objectives | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | In this tutorial, we will learn to: |
− | * | + | * Add, move, re-order and close tabs |
− | * | + | * Use the ''' Side Panel''' to browse and open files |
− | * | + | * Insert line numbers and |
− | * | + | * Wrap text |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 3: |
− | + | System Requirements | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | To record this tutorial, I am using: |
− | * | + | * '''Ubuntu Linux '''14.04 operating system |
− | * | + | * '''gedit''' 3.10 |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 4: |
− | + | Pre-requisites | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | To follow this tutorial, you should have working knowledge of any operating system. |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let's open the ''' gedit Text editor.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the tab |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | By default, the ''' gedit Text editor''' has one tab named as ''' Untitled Document 1.''' |
+ | |||
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Copy and paste the code |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Now, pause the tutorial and type the following code as displayed on the screen. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the C program |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | This is a program in ''' C''' language. |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let us save the program. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | '''Ctrl + S''' |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Press '''Ctrl + S ''' keys simultaneously on the keyboard. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Enter ''' Name''' >> ''' Sample.c''' |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | In the ''' Save''' dialog box, enter the name as ''' sample dot c.''' |
− | + | The '''extension ‘c’''' indicates that it is a ''' C''' language program. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | '''Browse >>''' Select ''' Desktop''' |
− | + | Click ''' Save.''' | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Select the folder where you want to save the file. |
− | + | I will select ''' Desktop '''and then click on ''' Save''' button. | |
− | + | The tab name has changed to ''' sample dot c.''' | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the different colors |
− | + | Point to the status bar | |
+ | | style="border:1pt solid #000000;padding:0.097cm;" | Did you notice the various colors in the program after you saved the file? | ||
− | + | This is because ''' gedit Text editor''' recognizes the typed code as a ''' C program.''' | |
− | + | We will learn more about syntax highlighting in later tutorials. | |
− | + | Also, notice the '''status bar''' which has changed to ''' 'C'.''' | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the top bar of the window |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | We can see that the '''window''' name has also changed to''' sample dot c.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | From the Main menu, click File>>New |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | To add a new tab, from the''' Main''' menu, click''' File''' and''' New'''. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the Untitled Document1 |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | A new tab named''' Untitled Document 1''' is created to the right of the document''' sample.c.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the top bar of the window |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Again, the title at the top of the window has changed to ''' Untitled Document 1.''' |
+ | |||
+ | So, the name of the active tab is displayed as the title of the window. | ||
− | |||
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click >> ''' New''' icon from the toolbar |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Now, let’s learn another way to open a new tab. |
− | + | Click on the ''' New''' icon in the toolbar. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to ''' untitled Document 2''' |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Another tab ''' Untitled Document 2''' has been created. |
− | + | The numbering of tabs begins at 1 and increments by 1 for each new tab that is opened. | |
− | + | That’s why this tab is numbered 2. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click 'New' icon twice in the toolbar |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | In a similar way, let's create two more new documents. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to all tabs |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Now, we have a total of 5 tabs including ''' sample.c.''' |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | How do we navigate through these tabs? |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the triangular button on both ends of the tab bar |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Notice, there is a triangular button on both ends of the tab bar. |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | You can use these buttons to navigate through the tabs. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click on the left triangular button |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let's click on the left triangular button till the document ''' sample.c''' is visible. |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | How do we close the tabs? |
− | + | This is very simple. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Main Menu >> File >>Close |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | From the ''' Main''' menu, click ''' File''' and ''' Close''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the X button on the tab |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Alternately, you can simply click on the ''' X''' button on the tab. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Close Untitled Document 2 and 3 |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let's close the ''' Untitled Document 2''' and ''' 3''' in this manner. |
− | + | So, we are left with '''sample dot c, Untitled Document 1''' and '''Untitled Document 4.''' | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click ''' New''' icon twice in the toolbar |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Now, let's add two more new documents. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to ''' Untitled Document 2''' and ''' 3''' |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | These two new tabs are named as ''' Untitled Document 2''' and ''' 3.''' |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The documents are numbered or ordered, as shown here. |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The ordering may be different in lower versions of '''gedit'''. |
− | + | Such differences in versions will happen and the learner should be prepared to handle these. | |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let's rearrange the tabs now. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Select ''' Untitled Document1.''' |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | First, select ''' Untitled Document1.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Press the left mouse button and drag it to the left. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Press the left '''mouse''' button and drop it to the left of the file '''sample.c.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Release the left mouse button |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Release the left '''mouse''' button. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the tab that is rearranged. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The tab is rearranged. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Rearrange the tab 2and 4 |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | In the same manner, let us rearrange the tab '''2''' and ''' 4.''' |
− | + | <<PAUSE>> | |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Next, let's learn to move a tab to another window. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Select the tab where sample.c is present |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | First, select the tab ''' sample.c''' which we want to move. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Right click on the tab and select ''''Move to New Window'''' |
− | + | Point to sample.c that opens in new window | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Then, right-click on the tab and select ''''Move to New Window''''. |
− | + | '''sample.c''' opens in a new window. | |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let's switch from''' sample.c''' to the other window with the''' Untitled Documents.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Main menu >> View >> Side Pane |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Go to the''' Main''' menu and click''' View''' and''' Side Panel.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the Side Pane on the left side of the window |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The''' Side Panel''' opens up on the left side of the window. |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | You can view the names of all the documents in the ''' Side Panel.''' |
− | + | It is in the same order in which they appear on the window panel. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | In the''' Side Pane''', click on''' Untitled Document 2.''' |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | In the ''' Side Panel''', click on the''' Untitled Document 2'''. |
− | + | That document becomes active now. | |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let us rearrange the document in the''' gedit Text editor window,''' as we did before. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click on the tab Untitled Document 4. |
− | + | Press the left mouse button and drag and drop the file after the last tab. | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let’s click on the tab''' Untitled Document 4.''' |
− | + | Click, drag and drop the file after the last tab. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the changes in the Side Pane. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Notice that the document order has now changed in the''' Side Panel,''' too. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | To close the Side Pane, simply click the''' X''' button on the top right. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | To close the''' Side Panel''', simply click the''' X''' button on the top right. |
− | + | <<PAUSE>> | |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let's learn how to go to a specific line number in the''' gedit Text editor''' file. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Switch to sample.c file. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Switch to''' sample.c''' file. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click Search >> Go to line |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | From the''' Main''' menu, click''' Search''' and''' Go to Line'''. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the Go to Line dialog box |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The''' Go to Line''' dialog-box appears on the top right corner of the''' gedit Text editor''' window. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Enter 8 in the box |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | In the dialog box, enter the number 8 and press the''' Enter''' key. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the cursor |
− | + | Point to the status bar | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The cursor jumps to line 8. |
− | + | We can also see the line number as 8 in the status bar. | |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | But, it will be easy to locate the cursor if the line number is displayed along with the text. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click Edit >> Preferences |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | To display the line numbers of the code, from the''' Main''' menu, select''' Edit''' and''' Preferences.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to gedit Preferences dialog box |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | '''gedit Preferences''' dialog box appears. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click View tab |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click the ''' View''' tab. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Check the Display line numbers box. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Put a checkmark on '''Display line numbers''' option. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Check the Highlight current line box. |
− | + | Click Close. | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Put a checkmark on''' Highlight current line''' option. |
− | + | Click on the '''Close''' button. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the line numbers |
− | |||
− | + | Point to the current line number in bold. | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Notice that the line numbers are displayed to the left of the code. |
− | + | Also, the line on which your cursor is displayed is in '''bold'''. | |
− | + | <<PAUSE>> | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 5: |
− | + | Text Wrapping | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Next we will learn about text wrapping. |
− | * | + | * A line of code in a program may exceed the length of the''' gedit Text editor''' window. |
− | * | + | * So, it becomes difficult to read the entire line of the text. |
− | * | + | * '''Text wrapping''' helps to wrap the text within the size of the window. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Switch back to the''' sample.c''' program. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Switch back to the''' sample.c''' program. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click''' Edit''' >>''' Preferences''' |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | From the''' Main''' menu, click''' Edit''' and then''' Preferences.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the check box '''Enable text wrapping''' |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Notice that the option''' Enable text wrapping''' is checked by default. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Uncheck the box. Click Close. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Uncheck this box. |
− | + | Click on the '''Close''' button. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Type the below code at the end of the program |
− | + | printf ("This is a sample program in C which explains the working of if else statement"); | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Let me add a line of code at the end of the program. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the line where it exceeds the window length. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Notice that the length of the text has exceeded the size of the window. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Click''' Edit'''>>''' Preferences''' |
− | + | Click on the''' View''' tab. | |
− | + | Check the option''' Enable text wrapping''' | |
− | + | Click''' Close'''. | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Now, let's check the option ''' Enable text wrapping.''' |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Point to the text to show text wrapping. |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The text has been neatly wrapped to fit the window. |
− | + | <<PAUSE>> | |
|- | |- | ||
| style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | | style="border:1pt solid #000000;padding:0.097cm;color:#000000;" | | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | This brings us to the end of this tutorial. Let us summarise. |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 8: |
<div style="color:#000000;">'''Summary'''</div> | <div style="color:#000000;">'''Summary'''</div> | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | In this tutorial, we learnt to: |
− | * | + | * Add, move, re-order and close tabs |
− | * | + | * Use the''' Side Panel''' to browse and open files |
− | * | + | * Insert line numbers and |
− | * | + | * Wrap text |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 9: |
<div style="color:#000000;">'''Assignment'''</div> | <div style="color:#000000;">'''Assignment'''</div> | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Here is an assignment for you. |
− | * | + | * Create 5 new tabs in the''' gedit Text Editor''' |
− | * | + | * Save them as''' One, Two,Three, Four''' and''' Five''' |
− | * | + | * Now re-order the tabs as''' Three, Two, One, Five''' and''' Four''' |
− | * | + | * Open the''' Side Panel''' |
− | * | + | * Click the file''' Five''' in the''' Side Panel '''and enter some text |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 11: |
− | + | About Spoken Tutorial project | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The video at the following link summarises the Spoken Tutorial project. |
− | + | Please download and watch it. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 12: |
− | + | Spoken Tutorial workshops | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | The''' Spoken Tutorial Project''' Team: |
− | * | + | * conducts workshops using spoken tutorials and |
+ | * gives certificates on passing online tests. | ||
− | + | For more details, please write to us. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 13: |
− | + | Forum for specific questions | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Do you have questions in THIS Spoken Tutorial? |
− | * | + | * Please visit this site. |
− | * | + | * Choose the minute and second where you have the question. |
− | * | + | * Explain your question briefly. |
+ | * Someone from our team will answer them. | ||
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | Slide 14: |
− | + | ||
− | + | ||
− | + | ||
− | + | Acknowledgement | |
+ | | style="border:1pt solid #000000;padding:0.097cm;" | Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. | ||
− | + | More information on this mission is available at this link. | |
|- | |- | ||
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | | style="border:1pt solid #000000;padding:0.097cm;" | |
− | + | | style="border:1pt solid #000000;padding:0.097cm;" | This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. | |
− | | style="border:1pt solid #000000;padding:0.097cm;" | | + | |
|- | |- | ||
|} | |} |
Latest revision as of 11:51, 1 February 2017
Title of script: Handling tabs in gedit Text editor
Author: Nirmala Venkat
Keywords: Add tab, Move tab, Reorder tab, Close tab, Side panel, Insert line numbers, Wrap text, Video tutorial
Visual Cue | Narration |
Slide 1: | Welcome to the Spoken Tutorial on Handling tabs in gedit Text editor. |
Slide 2:
Learning objectives |
In this tutorial, we will learn to:
|
Slide 3:
System Requirements |
To record this tutorial, I am using:
|
Slide 4:
Pre-requisites |
To follow this tutorial, you should have working knowledge of any operating system. |
Let's open the gedit Text editor. | |
Point to the tab | By default, the gedit Text editor has one tab named as Untitled Document 1. |
Copy and paste the code | Now, pause the tutorial and type the following code as displayed on the screen. |
Point to the C program | This is a program in C language. |
Let us save the program. | |
Ctrl + S | Press Ctrl + S keys simultaneously on the keyboard. |
Enter Name >> Sample.c | In the Save dialog box, enter the name as sample dot c.
The extension ‘c’ indicates that it is a C language program. |
Browse >> Select Desktop
Click Save. |
Select the folder where you want to save the file.
I will select Desktop and then click on Save button. The tab name has changed to sample dot c. |
Point to the different colors
Point to the status bar |
Did you notice the various colors in the program after you saved the file?
This is because gedit Text editor recognizes the typed code as a C program. We will learn more about syntax highlighting in later tutorials. Also, notice the status bar which has changed to 'C'. |
Point to the top bar of the window | We can see that the window name has also changed to sample dot c. |
From the Main menu, click File>>New | To add a new tab, from the Main menu, click File and New. |
Point to the Untitled Document1 | A new tab named Untitled Document 1 is created to the right of the document sample.c. |
Point to the top bar of the window | Again, the title at the top of the window has changed to Untitled Document 1.
So, the name of the active tab is displayed as the title of the window. |
Click >> New icon from the toolbar | Now, let’s learn another way to open a new tab.
Click on the New icon in the toolbar. |
Point to untitled Document 2 | Another tab Untitled Document 2 has been created.
The numbering of tabs begins at 1 and increments by 1 for each new tab that is opened. That’s why this tab is numbered 2. |
Click 'New' icon twice in the toolbar | In a similar way, let's create two more new documents. |
Point to all tabs | Now, we have a total of 5 tabs including sample.c. |
How do we navigate through these tabs? | |
Point to the triangular button on both ends of the tab bar | Notice, there is a triangular button on both ends of the tab bar. |
You can use these buttons to navigate through the tabs. | |
Click on the left triangular button | Let's click on the left triangular button till the document sample.c is visible. |
How do we close the tabs?
This is very simple. | |
Main Menu >> File >>Close | From the Main menu, click File and Close |
Point to the X button on the tab | Alternately, you can simply click on the X button on the tab. |
Close Untitled Document 2 and 3 | Let's close the Untitled Document 2 and 3 in this manner.
So, we are left with sample dot c, Untitled Document 1 and Untitled Document 4. |
Click New icon twice in the toolbar | Now, let's add two more new documents. |
Point to Untitled Document 2 and 3 | These two new tabs are named as Untitled Document 2 and 3. |
The documents are numbered or ordered, as shown here. | |
The ordering may be different in lower versions of gedit.
Such differences in versions will happen and the learner should be prepared to handle these. | |
Let's rearrange the tabs now. | |
Select Untitled Document1. | First, select Untitled Document1. |
Press the left mouse button and drag it to the left. | Press the left mouse button and drop it to the left of the file sample.c. |
Release the left mouse button | Release the left mouse button. |
Point to the tab that is rearranged. | The tab is rearranged. |
Rearrange the tab 2and 4 | In the same manner, let us rearrange the tab 2 and 4.
<<PAUSE>> |
Next, let's learn to move a tab to another window. | |
Select the tab where sample.c is present | First, select the tab sample.c which we want to move. |
Right click on the tab and select 'Move to New Window'
Point to sample.c that opens in new window |
Then, right-click on the tab and select 'Move to New Window'.
sample.c opens in a new window. |
Let's switch from sample.c to the other window with the Untitled Documents. | |
Main menu >> View >> Side Pane | Go to the Main menu and click View and Side Panel. |
Point to the Side Pane on the left side of the window | The Side Panel opens up on the left side of the window. |
You can view the names of all the documents in the Side Panel.
It is in the same order in which they appear on the window panel. | |
In the Side Pane, click on Untitled Document 2. | In the Side Panel, click on the Untitled Document 2.
That document becomes active now. |
Let us rearrange the document in the gedit Text editor window, as we did before. | |
Click on the tab Untitled Document 4.
Press the left mouse button and drag and drop the file after the last tab. |
Let’s click on the tab Untitled Document 4.
Click, drag and drop the file after the last tab. |
Point to the changes in the Side Pane. | Notice that the document order has now changed in the Side Panel, too. |
To close the Side Pane, simply click the X button on the top right. | To close the Side Panel, simply click the X button on the top right.
<<PAUSE>> |
Let's learn how to go to a specific line number in the gedit Text editor file. | |
Switch to sample.c file. | Switch to sample.c file. |
Click Search >> Go to line | From the Main menu, click Search and Go to Line. |
Point to the Go to Line dialog box | The Go to Line dialog-box appears on the top right corner of the gedit Text editor window. |
Enter 8 in the box | In the dialog box, enter the number 8 and press the Enter key. |
Point to the cursor
Point to the status bar |
The cursor jumps to line 8.
We can also see the line number as 8 in the status bar. |
But, it will be easy to locate the cursor if the line number is displayed along with the text. | |
Click Edit >> Preferences | To display the line numbers of the code, from the Main menu, select Edit and Preferences. |
Point to gedit Preferences dialog box | gedit Preferences dialog box appears. |
Click View tab | Click the View tab. |
Check the Display line numbers box. | Put a checkmark on Display line numbers option. |
Check the Highlight current line box.
Click Close. |
Put a checkmark on Highlight current line option.
Click on the Close button. |
Point to the line numbers
|
Notice that the line numbers are displayed to the left of the code.
Also, the line on which your cursor is displayed is in bold. <<PAUSE>> |
Slide 5:
Text Wrapping |
Next we will learn about text wrapping.
|
Switch back to the sample.c program. | Switch back to the sample.c program. |
Click Edit >> Preferences | From the Main menu, click Edit and then Preferences. |
Point to the check box Enable text wrapping | Notice that the option Enable text wrapping is checked by default. |
Uncheck the box. Click Close. | Uncheck this box.
Click on the Close button. |
Type the below code at the end of the program
printf ("This is a sample program in C which explains the working of if else statement"); |
Let me add a line of code at the end of the program. |
Point to the line where it exceeds the window length. | Notice that the length of the text has exceeded the size of the window. |
Click Edit>> Preferences
Click on the View tab. Check the option Enable text wrapping Click Close. |
Now, let's check the option Enable text wrapping. |
Point to the text to show text wrapping. | The text has been neatly wrapped to fit the window.
<<PAUSE>> |
This brings us to the end of this tutorial. Let us summarise. | |
Slide 8:
Summary
|
In this tutorial, we learnt to:
|
Slide 9:
Assignment
|
Here is an assignment for you.
|
Slide 11:
About Spoken Tutorial project |
The video at the following link summarises the Spoken Tutorial project.
Please download and watch it. |
Slide 12:
Spoken Tutorial workshops |
The Spoken Tutorial Project Team:
For more details, please write to us. |
Slide 13:
Forum for specific questions |
Do you have questions in THIS Spoken Tutorial?
|
Slide 14:
Acknowledgement |
Spoken Tutorial project is funded by NMEICT, MHRD, Government of India.
More information on this mission is available at this link. |
This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. |