100% found this document useful (1 vote)
27 views60 pages

Visual Studio Code Distilled: Evolved Code Editing For Windows, Macos, and Linux 1St Edition Alessandro Del Sole

The document promotes a collection of ebooks available for download at textbookfull.com, including titles such as 'Visual Studio Code Distilled' and 'Beginning Visual Studio for Mac'. It provides links to various resources and emphasizes the convenience of accessing digital formats like PDF, ePub, and MOBI. Additionally, it outlines the content structure of 'Visual Studio Code Distilled', covering installation, customization, and code editing features.

Uploaded by

ulduzrodh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
27 views60 pages

Visual Studio Code Distilled: Evolved Code Editing For Windows, Macos, and Linux 1St Edition Alessandro Del Sole

The document promotes a collection of ebooks available for download at textbookfull.com, including titles such as 'Visual Studio Code Distilled' and 'Beginning Visual Studio for Mac'. It provides links to various resources and emphasizes the convenience of accessing digital formats like PDF, ePub, and MOBI. Additionally, it outlines the content structure of 'Visual Studio Code Distilled', covering installation, customization, and code editing features.

Uploaded by

ulduzrodh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Explore the full ebook collection and download it now at textbookfull.

com

Visual Studio Code Distilled: Evolved Code Editing


for Windows, macOS, and Linux 1st Edition
Alessandro Del Sole

https://textbookfull.com/product/visual-studio-code-
distilled-evolved-code-editing-for-windows-macos-and-
linux-1st-edition-alessandro-del-sole/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://textbookfull.com


Click here to visit textbookfull.com and download textbook now
Your digital treasures (PDF, ePub, MOBI) await
Download instantly and pick your perfect format...

Read anywhere, anytime, on any device!

Visual Studio Code Distilled: Evolved Code Editing for


Windows, macOS, and Linux 3 / converted Edition Alessandro
Del Sole
https://textbookfull.com/product/visual-studio-code-distilled-evolved-
code-editing-for-windows-macos-and-linux-3-converted-edition-
alessandro-del-sole/
textbookfull.com

Beginning Visual Studio for Mac: Build Cross-Platform Apps


with Xamarin and .NET Core Alessandro Del Sole

https://textbookfull.com/product/beginning-visual-studio-for-mac-
build-cross-platform-apps-with-xamarin-and-net-core-alessandro-del-
sole/
textbookfull.com

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-loucas/

textbookfull.com

Visual Studio Code: End-to-End Editing and Debugging Tools


for Web Developers Bruce Johnson

https://textbookfull.com/product/visual-studio-code-end-to-end-
editing-and-debugging-tools-for-web-developers-bruce-johnson/

textbookfull.com
Visual Studio Extensibility Development: Extending Visual
Studio IDE for Productivity, Quality, Tooling, and
Analysis Rishabh Verma
https://textbookfull.com/product/visual-studio-extensibility-
development-extending-visual-studio-ide-for-productivity-quality-
tooling-and-analysis-rishabh-verma/
textbookfull.com

2018 International Building Code 1st Edition International


Code Council

https://textbookfull.com/product/2018-international-building-code-1st-
edition-international-code-council/

textbookfull.com

The Code Breaker: Jennifer Doudna, Gene Editing & the


Future of the Human Race 1st Edition Walter Isaacson

https://textbookfull.com/product/the-code-breaker-jennifer-doudna-
gene-editing-the-future-of-the-human-race-1st-edition-walter-isaacson/

textbookfull.com

Visual Studio Extensibility Development: Extending Visual


Studio IDE for Productivity, Quality, Tooling, Analysis,
and Artificial Intelligence 2nd Edition Rishabh Verma
https://textbookfull.com/product/visual-studio-extensibility-
development-extending-visual-studio-ide-for-productivity-quality-
tooling-analysis-and-artificial-intelligence-2nd-edition-rishabh-
verma/
textbookfull.com

International Building Code 2018 2018th Edition


International Code Council

https://textbookfull.com/product/international-building-
code-2018-2018th-edition-international-code-council/

textbookfull.com
Visual Studio
Code Distilled
Evolved Code Editing for Windows,
macOS, and Linux

Alessandro Del Sole
Visual Studio Code
Distilled
Evolved Code Editing for
Windows, macOS, and Linux

Alessandro Del Sole


Visual Studio Code Distilled: Evolved Code Editing for Windows,
macOS, and Linux
Alessandro Del Sole
Cremona, Italy

ISBN-13 (pbk): 978-1-4842-4223-0 ISBN-13 (electronic): 978-1-4842-4224-7


https://doi.org/10.1007/978-1-4842-4224-7
Library of Congress Control Number: 2018965198

Copyright © 2019 by Alessandro Del Sole


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Joan Murray
Development Editor: Laura Berendson
Coordinating Editor: Jill Balzano
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505,
e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a
California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc
(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit http://www.apress.
com/rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference
our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available
to readers on GitHub via the book's product page, located at www.apress.com/978-1-4842-4223-0.
For more detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
To Angelica, the love of my life.
Table of Contents
About the Author���������������������������������������������������������������������������������xi
Acknowledgments�����������������������������������������������������������������������������xiii
Introduction����������������������������������������������������������������������������������������xv

Chapter 1: Introducing Visual Studio Code�������������������������������������������1


Introducing Visual Studio Code�����������������������������������������������������������������������������2
When and Why Visual Studio Code������������������������������������������������������������������������3
Installing and Configuring Visual Studio Code������������������������������������������������������5
Installing Visual Studio Code on Windows�������������������������������������������������������6
Installing Visual Studio Code on macOS����������������������������������������������������������9
Installing Visual Studio Code on Linux�����������������������������������������������������������10
Localization Support��������������������������������������������������������������������������������������12
Updating Visual Studio Code��������������������������������������������������������������������������13
Previewing Features with Insiders Builds�����������������������������������������������������15
Summary������������������������������������������������������������������������������������������������������������17

Chapter 2: Getting to Know the Environment�������������������������������������19


The Welcome Page����������������������������������������������������������������������������������������������20
The Code Editor���������������������������������������������������������������������������������������������������21
Reordering, Resizing, and Zooming Editor Windows�������������������������������������22
The Status Bar����������������������������������������������������������������������������������������������������23
The Activity Bar���������������������������������������������������������������������������������������������������24

v
Table of Contents

The Side Bar��������������������������������������������������������������������������������������������������������26


The Explorer Bar��������������������������������������������������������������������������������������������26
The Search Tool���������������������������������������������������������������������������������������������31
The Git Bar�����������������������������������������������������������������������������������������������������32
The Debug Bar�����������������������������������������������������������������������������������������������34
The Extensions Bar����������������������������������������������������������������������������������������35
The Settings Button���������������������������������������������������������������������������������������36
Navigating Between Files�����������������������������������������������������������������������������������36
The Command Palette�����������������������������������������������������������������������������������������37
The Panels Area��������������������������������������������������������������������������������������������������38
The Problems Panel���������������������������������������������������������������������������������������38
The Output Panel�������������������������������������������������������������������������������������������40
The Debug Console Panel������������������������������������������������������������������������������41
Working with the Terminal�����������������������������������������������������������������������������42
Summary������������������������������������������������������������������������������������������������������������43

Chapter 3: Language Support and Code Editing Features������������������45


Language Support�����������������������������������������������������������������������������������������������46
Working with C# and C++�����������������������������������������������������������������������������47
Basic Code Editing Features�������������������������������������������������������������������������������48
Working with Text������������������������������������������������������������������������������������������48
Syntax Colorization����������������������������������������������������������������������������������������49
Delimiter Matching and Text Selection����������������������������������������������������������51
Code Block Folding����������������������������������������������������������������������������������������51
Multicursors��������������������������������������������������������������������������������������������������52
Reusable Code Snippets��������������������������������������������������������������������������������52
Word Completion�������������������������������������������������������������������������������������������54
Minimap Mode�����������������������������������������������������������������������������������������������55

vi
Table of Contents

Whitespace Rendering and Breadcrumbs�����������������������������������������������������56


Markdown Preview����������������������������������������������������������������������������������������58
Evolved Code Editing�������������������������������������������������������������������������������������������59
Working with IntelliSense������������������������������������������������������������������������������60
Parameter Hints���������������������������������������������������������������������������������������������62
Inline Documentation with Tooltips���������������������������������������������������������������62
Go To Definition����������������������������������������������������������������������������������������������63
Find All References����������������������������������������������������������������������������������������65
Peek Definition����������������������������������������������������������������������������������������������66
Renaming Symbols and Identifiers����������������������������������������������������������������67
Live Code Analysis�����������������������������������������������������������������������������������������68
Summary������������������������������������������������������������������������������������������������������������76

Chapter 4: Working with Files and Folders����������������������������������������77


Visual Studio Code and Project Systems������������������������������������������������������������77
Working with Individual Files������������������������������������������������������������������������������78
Creating Files�������������������������������������������������������������������������������������������������79
File Encoding, Line Terminators, and Line Browsing�������������������������������������80
Working with Folders and Projects���������������������������������������������������������������������82
Opening a Folder�������������������������������������������������������������������������������������������84
Opening .NET Core Solutions�������������������������������������������������������������������������86
Opening JavaScript and TypeScript Projects�������������������������������������������������87
Opening Loose Folders����������������������������������������������������������������������������������88
Working with Workspaces�����������������������������������������������������������������������������������89
Creating Workspaces�������������������������������������������������������������������������������������91
Opening Existing Workspaces�����������������������������������������������������������������������92
Workspace Structure�������������������������������������������������������������������������������������92
Summary������������������������������������������������������������������������������������������������������������93

vii
Table of Contents

Chapter 5: Customizing Visual Studio Code���������������������������������������95


Customizations and Extensions Explained����������������������������������������������������������95
Customizing Visual Studio Code��������������������������������������������������������������������������97
Theme Selection��������������������������������������������������������������������������������������������97
Customizing the Environment������������������������������������������������������������������������99
Customizing Key Bindings���������������������������������������������������������������������������106
Summary����������������������������������������������������������������������������������������������������������110

Chapter 6: Installing and Managing Extensions�������������������������������111


Installing Extensions�����������������������������������������������������������������������������������������111
Extension Recommendations����������������������������������������������������������������������115
Useful Extensions����������������������������������������������������������������������������������������117
Managing Extensions����������������������������������������������������������������������������������������118
Configuring Extensions��������������������������������������������������������������������������������120
Hints About Extension Authoring�����������������������������������������������������������������������122
Summary����������������������������������������������������������������������������������������������������������122

Chapter 7: Source Control with Git���������������������������������������������������125


Source Control in Visual Studio Code����������������������������������������������������������������125
Downloading Other Source Control Providers���������������������������������������������126
Managing Repositories�������������������������������������������������������������������������������������127
Initializing a Local Git Repository����������������������������������������������������������������128
Creating a Remote Repository���������������������������������������������������������������������130
Handling File Changes��������������������������������������������������������������������������������������132
Staging Changes�����������������������������������������������������������������������������������������134
Managing Commits�������������������������������������������������������������������������������������������135
Working with the Git Command Line Interface�������������������������������������������������137

viii
Table of Contents

Creating and Managing Branches���������������������������������������������������������������������138


Switching to a Different Branch������������������������������������������������������������������140
Merging from a Branch��������������������������������������������������������������������������������140
Deleting Branches���������������������������������������������������������������������������������������141
Adding Power to the Git Tooling with Extensions����������������������������������������������142
Git History����������������������������������������������������������������������������������������������������142
GitLens���������������������������������������������������������������������������������������������������������144
GitHub Pull Requests�����������������������������������������������������������������������������������148
Working with Azure DevOps and Team Foundation Server�������������������������������150
Summary����������������������������������������������������������������������������������������������������������154

Chapter 8: Automating Tasks�����������������������������������������������������������157


Understanding Tasks�����������������������������������������������������������������������������������������158
Tasks Types�������������������������������������������������������������������������������������������������159
Running and Managing Tasks����������������������������������������������������������������������159
The Default Build Task���������������������������������������������������������������������������������164
Auto-Detected Tasks������������������������������������������������������������������������������������164
Configuring Tasks����������������������������������������������������������������������������������������166
Running Files with a Default Program���������������������������������������������������������188
Summary����������������������������������������������������������������������������������������������������������189

Chapter 9: Running and Debugging Code�����������������������������������������191


Creating Applications����������������������������������������������������������������������������������������191
Creating .NET Core Projects������������������������������������������������������������������������192
Creating Projects on Other Platforms����������������������������������������������������������195
Debugging Your Code����������������������������������������������������������������������������������������196
Configuring the Debugger���������������������������������������������������������������������������198

ix
Table of Contents

Managing Breakpoints��������������������������������������������������������������������������������202
Debugging an Application����������������������������������������������������������������������������203
Supporting Azure, Docker, and Artificial Intelligence�����������������������������������������207
Summary����������������������������������������������������������������������������������������������������������209

Index�������������������������������������������������������������������������������������������������211

x
About the Author
Alessandro Del Sole is Senior Software Engineer for a healthcare company,
building mobile apps for doctors and dialysis patients. He has been in the
software industry for almost 20 years, focusing on Microsoft technologies
such as .NET, C#, Visual Studio, and Xamarin. He has been a trainer,
consultant, and a Microsoft MVP since 2008 and is the author of many
technical books. He is a Xamarin Certified Mobile Developer, Microsoft
Certified Professional, and a Microsoft Programming Specialist in C#.

xi
Acknowledgments
Thanks to Joan Murray, Jill Balzano, Laura Berendson and to everyone at
Apress for the opportunity and the great teamwork on this book.
Special thanks to the technical editor, Dr. James McCaffrey, who
contributed to the quality and accuracy of the contents.
Special thanks to my girlfriend Angelica, who understands and never
complains about the time I spend on writing books.

xiii
Introduction
One of the most common requirements in software development today
is building applications and services that run on multiple systems and
devices, especially with the continued expansion of cloud and artificial
intelligence services.
Developers have many options to build cross-platform and cross-­
device software, from languages to development platforms and
tools. However, in most cases such tools rely on proprietary systems,
therefore creating strong dependencies. Moreover, most development
tools target specific platforms and development scenarios. Microsoft
Visual Studio Code makes a step forward, by providing a fully featured
development environment for Windows, macOS, and Linux that not
only offers advanced coding features but also integrated tools that span
across the entire application lifecycle from coding to debugging to team
collaboration. In this book, developers with any skill will learn how to
leverage Visual Studio Code to target scenarios such as web, cloud, and
mobile development with the programming language of their choice,
providing guidance to build apps for any system and any device.

xv
CHAPTER 1

Introducing Visual
Studio Code
Visual Studio Code is not just another evolved notepad with syntax
colorization and automatic indentation. Instead, it is a very powerful
code-focused development environment expressly designed to make
it easier to write web, mobile, and cloud applications using languages
that are available to different development platforms and to support
the application development lifecycle with a built-in debugger and with
integrated support to the popular Git version control engine.
With Visual Studio Code, you can work with individual code files or
with structured file systems based on folders. This chapter provides an
introduction to Visual Studio Code giving you information on when and
why you should use it, as well as about installing and configuring the
program on the different supported operating systems.

Note Across the book, I will refer to the product with its full
name, Visual Studio Code, and its friendly names VS Code and Code
interchangeably.

© Alessandro Del Sole 2019 1


A. Del Sole, Visual Studio Code Distilled, https://doi.org/10.1007/978-1-4842-4224-7_1
Chapter 1 Introducing Visual Studio Code

Introducing Visual Studio Code


Visual Studio Code has been the first cross-platform development tool
in the Microsoft Visual Studio family that runs on Windows, Linux, and
macOS. It is free, open source (https://github.com/Microsoft/vscode),
and it is definitely a code-centric tool, which makes it easier to edit code
files and folder-based project systems as well as writing cross-platform
web and mobile applications over the most popular platforms, such as
Node.js and .NET Core, with integrated support for a huge number of
languages and rich editing features such as IntelliSense, finding symbol
references, quickly reaching a type definition, and much more.
Visual Studio Code is based on Electron (https://electronjs.org/),
a framework for creating cross-platform applications with native
technologies, and combines the simplicity of a powerful code editor with
the tools a developer needs to support the application lifecycle development,
including debuggers and version control integration based on Git. It is
therefore a complete development tool, rather than being a simple code
editor. For more advanced coding and development, you will certainly
consider Microsoft Visual Studio 2017 on Windows and Visual Studio for Mac
on macOS, but Visual Studio Code can be really helpful in many situations.
In this book, you learn how to use Visual Studio Code and how to get
the most out of it, seeing how you can use it both as a powerful code editor
and as a complete environment for end-to-end development. Except
where necessary, figures are based on the Microsoft Windows 10 operating
system, but there is no difference on Linux and macOS. Also, Visual Studio
Code includes a number of color themes that style its layout. In this book,
figures are based on the so-called Visual Studio Light Theme, so you might
see different colors. Chapter 5, “Customizing Visual Studio Code,” explains
how to change the theme, but if you want to be consistent with the book’s
figures, simply select File ➤ Preferences ➤ Color Theme and select the
Visual Studio Light Theme. It is worth mentioning that the theme you
select does not affect at all the features described in this book.

2
Chapter 1 Introducing Visual Studio Code

When and Why Visual Studio Code


Before you learn how to use Visual Studio Code, what features it offers, and
how it provides an improved code editing experience, you have to clearly
understand its purpose. Visual Studio Code is not a simple code editor;
rather it is a powerful environment that puts writing code at its center. The
main purpose of Visual Studio Code is making it easier to write code for
web, mobile, and cloud platforms for any developers working on different
operating systems, such as Windows, Linux, and macOS, making you
independent from proprietary development environments.
For a better understanding, let’s consider an example based on ASP.
NET Core, the cross-platform, open source technology able to run on
Windows, Linux, and macOS that Microsoft produced to create portable
web applications; forcing you to build cross-platform, portable web apps
with Microsoft Visual Studio 2017 would make you dependent on this
Integrated Development Environment (IDE). You could argue that the
Visual Studio 2017 Community edition is free of charge, but it only runs
on Windows. On the contrary, though it is not certainly intended to be
a replacement for more powerful and complete environments such as
its major brother, Visual Studio Code can run on a variety of operating
systems and can manage different project types, as well as the most
popular languages. To accomplish this, Visual Studio Code provides the
following core features:

• Built-in support for coding with many languages,


including those you typically use in cross-platform
development scenarios, with advanced editing features
and support for additional languages via extensibility

• Built-in debugger for Node.js, with support for


additional debuggers (such as .NET Core and Mono)
via extensibility

3
Chapter 1 Introducing Visual Studio Code

• Version control based on the popular Git engine, which


provides an integrated experience for collaboration
supporting code commits and branches, and that is the
proper choice for a tool intended to work with possibly
any language

In order to properly combine all these features into one tool, Visual
Studio Code provides a coding environment based on folders, which
makes it easy to work with code files that are not organized within projects
and offers a unified way to work with different languages. Starting from
this assumption, Code offers an advanced editing experience with features
that are common to any supported languages, plus some features that are
available to specific languages. As you learn throughout the book, Code
also makes it easy to extend its built-in features by supplying custom
languages, syntax coloring, editing tools, debuggers, and much more via
a number of extensibility points. It is a code-centric tool, with primary
focus on web, cross-platform code. That said, it does not provide all of the
features you need for full, more complex application development and
application lifecycle management and is not intended to be the proper
choice with some development platforms. If you have to make a choice,
consider the following points:
• Visual Studio Code can produce binaries and
executable files only if the language you use has
support to do so through a debugger. If you use a
language for which there is no extensive support (e.g.,
Visual Basic), Visual Studio Code is not able to invoke
a compiler. You can workaround this by implementing
task automation, discussed in Chapter 8, "Automating
Tasks," but this is different than having the compilation
process integrated.

4
Chapter 1 Introducing Visual Studio Code

• Visual Studio Code has no designers, so creating


an application’s user interface can only be done by
writing all of the related code manually. As you can
imagine, this is fine with some languages and for some
scenarios, but it can be very complicated with some
kinds of applications and development platforms,
especially if you are used to work with the powerful
graphical tools available in Microsoft Visual Studio.

• It is a general purpose tool and is not the proper choice


for specific development scenarios such as building
Windows desktop applications.

If your requirements are different, consider instead Microsoft Visual


Studio 2017 or Microsoft Visual Studio for Mac, which are optimized
for building, testing, deploying, and maintaining multiple types of
applications.
Now that you have a cleaner idea of Code’s goals, you are ready to learn
the amazing editing features that put it on the top of any other code editor.

Installing and Configuring Visual


Studio Code
Installing Visual Studio Code is an easy task. In fact, you can simply visit
https://code.visualstudio.com from your favorite browser, and the
web page will detect your operating system, suggesting the appropriate
installer. Figure 1-1 shows how the download page appears on Windows.

5
Chapter 1 Introducing Visual Studio Code

Figure 1-1. The download page for Visual Studio Code

In the next paragraphs, you will learn tips for installing Code on the
various supported systems.

Note The latest stable release at the time of this writing is version


1.27.2, released in August 2018 and called August Recovery.

Installing Visual Studio Code on Windows


Visual Studio Code can be installed on Windows 7, 8, and 10. For this
operating system, Visual Studio Code is available with two installers:
a global installer and a user-level installer. The first installer requires
administrative privileges for installation and makes Code available to all

6
Chapter 1 Introducing Visual Studio Code

users. The second installer makes Code available only to the currently
logged user, but it does not require administrative privileges.
The latter is the choice I recommend, especially if you work within a
corporate environment and you do not have administrative privileges to
install software on your PC. The Download for Windows button that you
can see in Figure 1-1 will automatically download the global installer. If
you instead wish to download the user-level installer, click the arrow at the
right of the button and then click the User Installer hyperlink. It is worth
mentioning that Visual Studio Code is available in two versions, 32 bit
and 64 bit. The download page will automatically suggest the version that
matches your operating system architecture, but if you wish to download a
different installer, you can click the arrow and then click Other downloads.
Once the download has been completed, launch the installer and
simply follow the guided procedure as you are already used to do with
most of Windows programs. During the installation, you will be prompted
to specify how you want to integrate shortcuts to Visual Studio Code in the
Windows’ shell. In the Select Additional Tasks dialog, make sure you select
(at least) the following options:

• Add “Open With Code” action to Windows Explorer


file context menu, which allows for right-clicking a
code file in the Explorer and opening such a file with
VS Code.

• Add “Open With Code” action to Windows Explorer


directory context menu, which allows for right-­
clicking a folder in the Explorer and opening such a
folder with VS Code.

• Add to PATH (available after restart), which adds


the VS Code’s pathname to the PATH environment
variable, making it easy to run Visual Studio Code from
the command line without typing the full path.

7
Chapter 1 Introducing Visual Studio Code

Note Some antivirus and system protection tools, such as


Symantec Endpoint Protection, might block the installation of some
files that are recognized as false positives. In most cases this will not
prevent Visual Studio Code from working, but it is recommended that
you disable the protection tool before installing Code or, if you do not
have elevated permissions, that you ask your administrator to do it
for you.

A specific dialog will inform you once the installation process has
completed. The installation folder for the user-level installer is C:\
Users\proga\AppData\Local\Programs\Microsoft VS Code, while the
installation folder for the global installer is C:\Program Files\Microsoft
VS Code on 64-bit systems and C:\Program Files(x86)\Microsoft VS
Code on 32-bit systems. You will find a shortcut to Visual Studio Code in
the Start menu and on the Desktop, if you selected the option to create
a shortcut during the installation. When started, Visual Studio Code
appears like in Figure 1-2.

8
Chapter 1 Introducing Visual Studio Code

Figure 1-2. Visual Studio Code running on Windows

Installing Visual Studio Code on macOS


Installing VS Code on macOS is extremely simple. From the download
page, simply click the Download for macOS button and wait for the
download to complete. On macOS, Visual Studio Code works as an
individual program, and therefore you simply need to double-click the
downloaded file to start the application. Figure 1-3 shows Visual Studio
Code running on macOS.

9
Chapter 1 Introducing Visual Studio Code

Figure 1-3. Visual Studio Code running on macOS

Installing Visual Studio Code on Linux


Linux is a very popular operating system and many derived distributions
exist, so there are different installers available depending on the
distribution you are using. For the Ubuntu and Debian distributions,
you will need the .deb installer. For the Red Hat Linux, Fedora, and
SUSE distributions, you will need the .rpm installer. This clarification is
important because, differently from Windows and macOS, the browser
might not be able to automatically detect the Linux distribution you are
using, and therefore it will offer both options.
Once installed, you will simply need to click the Show Applications
button on the desktop and then the Visual Studio Code shortcut. Figure 1-4
shows Visual Studio Code running on Ubuntu.

10
Chapter 1 Introducing Visual Studio Code

Figure 1-4. Visual Studio Code running on Ubuntu

Note If you are a Windows user and want to try Visual Studio Code
on a Linux distribution, you can create a virtual machine with the
Hyper-V tool. For example, you might install the latest Ubuntu version
(www.ubuntu.com/download/desktop) as an ISO image and
use it as an installation media in Hyper-V. On macOS, you need to
purchase the Apple Parallels Desktop software separately in order to
create virtual machines, but you can basically do the same.

11
Chapter 1 Introducing Visual Studio Code

L ocalization Support
Visual Studio Code ships in English, but it can be localized in many other
supported languages and cultures. When started, VS Code checks for the
operating system language and, if different from English, it shows a popup
suggesting to install a language pack for the culture of your operating
system. The localization support can be also enabled manually.
To accomplish this, select View ➤ Command Palette. When the text
box appears at the top of the page, type the following command:

> Configure Display Language

This will open a file called locale.json, which is the place where Visual
Studio Code stores the localization information. Figure 1-5 shows how this
file appears in the editor. As you can see in the comments, there is a link to
the documentation that contains the full list of supported cultures.

Note The Command Palette will be discussed thoroughly in the next


chapter.

Figure 1-5. Changing the localization for Visual Studio Code

12
Chapter 1 Introducing Visual Studio Code

For instance, if you wanted to change the localization from English


to Italian, you would replace en with it, saving your changes. At restart,
Visual Studio Code will apply the new localization downloading the
language pack it needs.

Updating Visual Studio Code


Visual Studio Code is configured to receive automatic updates in the
background and, usually, Microsoft releases updates monthly.

Note Because VS Code receives monthly updates, some features


might have been updated at the time of your reading, and others
might be totally new. This is a necessary clarification you should keep
in mind while reading, and it is also the reason why I will also provide
links to the official documentation, so that you can stay up to date
more easily.

Additionally, you can manually check for updates with Help ➤ Check
for Updates on Windows and Linux and with Code ➤ Check for Updates
on macOS. If you do not want to receive automatic updates and prefer
manual updates, you can disable automatic updates by selecting File ➤
Preferences ➤ Settings and then, in the Update section, disable the
background updates option. Figure 1-6 shows an example.

13
Chapter 1 Introducing Visual Studio Code

Figure 1-6. Disabling automatic updates

You will follow the same steps to re-enable updates in the background.
Whenever Visual Studio Code receives an update, you will receive a
notification that suggests you to restart Code in order to apply changes.
The first time you restart Visual Studio Code after an update, you will see
the release note for the version that was installed, as demonstrated in
Figure 1-7.

14
Chapter 1 Introducing Visual Studio Code

Figure 1-7. VS Code release notes

Release notes contain the list of new and updated features, as well as
hyperlinks that will open the proper feature page in the documentation.

Previewing Features with Insiders Builds


By default, the download page of the Visual Studio Code’s web site allows
you to download the latest stable build. However, Microsoft periodically
also releases preview builds of Visual Studio Code called Insiders builds
that you can download to have a look at new and updated upcoming
features before they are released to the general public.
15
Chapter 1 Introducing Visual Studio Code

Insiders builds can be downloaded from https://code.


visualstudio.com/insiders, and follow the same installation rules
described previously for each operating system. They have a different icon
color, typically a green icon instead of a blue icon, and the name you see in
the application bar is Visual Studio Code - Insiders instead of Visual Studio
Code (see Figure 1-8).

Figure 1-8. Visual Studio Code Insiders builds

Insiders builds and stable builds can work side by side without
any issues. Because each lives in its own environment, your setting
customizations and extensions you installed on the stable build will not
be automatically available to the Insiders build and vice versa, so you will
need to provide them again.

16
Other documents randomly have
different content
together in that mighty forest, the dwellers in the woods, resigning
their cheerfulness, began to shed tears.
SECTION C.

Then Rāma cast his eyes on (Bharata) as clad in bark and wearing
matted locks he lay on the earth with joined hands, incapable of
being gazed at, like the Sun at the time of the universal dissolution.
Then recognizing him a little, he took by the hand his brother
Bharata, lean, with a pallid countenance. And smelling the crown of
his head, and embracing that descendant of Raghu, Rāma took
Bharata on his lap and asked him affectionately, "Where was thy
father, child, that thou hast come to the forest? It certainly behoves
thee not to come unto the forest while he is living. Ah! I see thee
come from far after a long time. Why, my child, hast thou come unto
this gloomy forest? Is the king alive, my child, seeing that thou hast
come hither; or, afficted with grief, hath he suddenly gone to the
other world? And, O mild one, child that thou art, thy kingdom ever
thine hath not been wrested from thee? And, O thou having truth for
prowess, dost thou, my child, minister unto our sire? And is that
truthful one, that performer of Rajasuya and Açwamedha, ever
devoted to righteousness, king Daçarātha, well? And, my child, is
that exceedingly effulgent and learned Brāhmana ever steady in
morality, the priest of the Ikshwākus, duly honored? And, my child,
are Kauçalyā, and Sumitrā having a son, in happiness? And is the
noble Kaikeyi in spirits? And is that one, sprung from a mighty line,
humble and versed in various lore, thy priest, who performeth every
ceremony, who beareth no ill will, and whose gaze is ever fixed upon
our welfare,—honored? And do intelligent and sincere people
cognizant of the rules, look after the sacrificial fire? And do they
regularly inform thee of the proper seasons for performing the fire-
sacrifice? A dost thou regard the deities, the ancestral manes, the
preceptors like unto predecessors, the physicians, the Brāhmanas,
and the servants? And dost not disregard the preceptor Sudhanwā,
versed in excellent arms whether inspired with mantras or not, and
accomplished in the knowledge of polity? And, my child, hast thou
employed as thy concillors, persons, heroic, learned, self-controlled,
well-born, and understanding signs, who are like thy own self? O
descendant of Raghu, counsel well kept by clever councillors versed
in lore, is the root of victory with kings. And thou hast not come
under the sway of sleep? And thou awakest at the proper hour? And
dost thou during the short hours revolve the means of acquiring
wealth? And thou dost not take counsel either with thyself alone, or
(on the other hand) with a multiplicity of counsellors? And thy
counsel doth not range the kingdom (i. e. doth not take air)? And, O
descendant of Raghu, having determined upon a course costing
small effort but fraught with a mighty result, thou setst about it
sharply and delayest not? And do the (auxiliary) kings know only
those acts of thine that have been accomplished or those that are
well nigh so, and not those that thou intendest to set thine hand to?
And do others through inference or appearances come at a
knowledge of thy counsels, although undivulged to others by thyself
or thy counsellors; and (do thou and thy ministers) attain to a
knowledge of others' counsels? And passing by a thousand dunces,
dost thou set thy heart on having a single wise man? In times of
pecuniary stress, a wise man stands in excellent stead. And although
a king might be surrounded by a thousand or ten thousand fools, yet
he can count upon no assistance (at their hands). And a single able
counsellor, intelligent, heroic, and sagacious, bringeth great
prosperity upon a king or a prince. And, my child, dost thou employ
the best servants upon the best offices, the middling upon middling,
and the worst upon the worst? And dost thou employ upon the most
worthy offices counsellors who are above bribery, who have served
thy father and grand-father, and who are pure? And do the subjects
visited with condign punishment, as well as the ministers, disregard
thee, O son of Kaikeyi? And do the priests scorn thee like a fallen
one, even as females do those lascivious folks who use force
towards the former? He that doth not slay a physician skilled in ways
and means, a servant given to enlisting the sympathies of his fellow-
servants against his master, or a hero that covets riches, is slain (by
them). And hast thou chosen for thy general one that is confident, is
endowed with intelligence and fortitude, sprung in a respectable
race, and attached and able? And dost thou practically honor thy
foremost warriors possessed of prowess, who have already given
evidence of their manliness? And dost thou at the proper time grant
thy soldiers what thou shouldst—provision and pay; and dost not
delay in doing this? If the proper time for granting provision and pay
be passed, the servants get wroth with their master and tax him;
and great is the evil that springs herefrom. And are the principal
descendants of our race attached unto thee; and are they, when
enlisted on thy side with concentrated minds, ready to lay down
their lives? And, O Bharata, are thy spies persons coming from the
provinces, and learned, upright, endowed with presence of mind,
representing the truth, and possessed of wisdom? And dost thou
acquire intelligence of the expedients, eighteen176 in respect of
others, and fifteen in respect of thy own self,—by means of every
three spies appointed in connection with each of these expedients—
men quite ignorant of each other's counsels? And dost thou not
contemn those weak ones that, O destroyer of thy foes, having been
expelled, have come again (unto thee)? And, my child, thou dost not
minister unto atheistical Brāhmanas? These childish persons proud
of their learning are only fit for bringing evils upon others. While
there are excellent scriptures, these people of subtle intellects,
having acquired a knowledge of dialectics, speak vanities. And, my
child, dost thou protect the prosperous and renowned Ayodhyā,
inhabited formerly by our heroic predecessors; bearing a true name;
having strong gates; filled with elephants, steeds, and cars;
thronged by thousands; with noble Brāhmanas, Kshatriyas and
Vaiçyas breathing high spirits, and with their senses controlled, each
engaged in his own task; abounding in people learned in the Veda;
and surrounded with palatial mansions of various shapes? And, O
descendant of Raghu, are the flourishing provinces marked with
hundreds of Chaityas, filled with prosperous people, graced with
abodes of deities, places for distributing water, and tanks, with men
and women in happy mood, gay with meetings and festivities,
having their outskirts well furrowed, provided with beasts, void of ill
feelings, depending on tanks for their water supply, charming,
renounced by fierce animals, free from all kinds of fear, decked with
mines, left by unrighteous people, and well governed by my
predecessors,— having a good time of it? And do agriculturists and
cowherds find favor in thy sight? And remaining in their respective
vocations, do they enjoy happiness? And dost thou maintain them by
securing unto them what they wish for and removing from them
what they wish away? All the dwellers in his dominions should be
protected by the king. And dost thou conciliate the females; and are
they well protected by thee? And dost thou not regard them; and
dost thou not open unto them thy mind? And are the woods where
elephants breed, kept by thee; and hast thou kine? And dost thou
not foster mares and female-elephants? And dost thou show thyself
daily in the court, well robed? And rising in the morning, dost thou
show thyself in the high-ways? And do thy servants boldly present
themselves before thee; or do they all keep away? A middle course
contributes to their good fortune. And are all the forts furnished with
wealth, corn, arms, water, machines, artizans, and bowmen? And are
thy incomings great and outgoings slender? And, Raghu's
descendant, thou dost not give away thy coffers unto the
undeserving? And dost thou spend thy wealth in the interests of the
deities, or the pitrtis, or the Brāhmanas who have come unto thee,
or warriors, or friends? If any respectable, pure-spirited and clean
person happen to be accused by some one of theft or other crimes,
dost thou from covetuousness punish him without first having him
tried by persons versed in scripture? And, O best of men, is a thief,
that hath been caught, interrogated (as to his guilt), and found with
the stolen property on his person, set free (by thy men) from
motives of gain? And do thy counsellors, O descendant of Raghu,
accomplished in various lore, uninfluenced by greed, consider the
conduct of both the rich and the poor involved in peril? O son of the
Raghu race, the tears of those who have been falsely charged with
any offence, (and who have failed to obtain justice), dropping,
destroy the sons as well as the beasts of the ruler that minds his
own comfort only. And dost thou with these three—gifts, mind and
word—try to win over aged people, boys, physicians, and the
principal ones? And dost thou salute spiritual preceptors, aged
persons, ascetics, gods, guests, Chaityas, emancipated ones, and
Brāhmanas? And thou dost not oppose righteousness by interest, or
interest by virtue, or both by desire, intent on gratifying the senses?
And, O foremost of conquerors, dost thou, O thou cognisant of time,
in season resorting to interest, desire, and virtue respectively, attain
them, O bestower of boons? And do Brāhmanas versed in all
religious lore and knowing interest, together with the citizens and
the inhabitants of the provinces wish for thy happiness, O highly
wise one? Atheism, untruthfulness, inattention, anger,
procrastination, companionship with evil persons, indolence,
gratification of the senses, consultation with a single person
concerning the needs of a kingdom, taking counsel with those that
are cognisant of evils alone, omission to take in hand a task that
hath been decided upon, divulgence of counsel, noncommencement
of a course in the morning, and marching against all the foes at one
and the same time,— hast thou eschewed these ten and four faults?
And, O descendant of Raghu, truly understanding the tenth,177
fifth,178 fourth179 and seventh180 classes as well as the eighth,181
and third ones,182 and the three kinds of learning,183 and victory
over the senses, and the evils human and superhuman, six
attributes,184 and the (peculiar) duties (of royalty), and the twenty
classes,185 and the kinds of Prakritis186 and Mandala,187 and
Yatrā,188 chastisement, and war and peace having each two sources;
dost thou with due order observe all these? And, O wise one, dost
thou, as laid down in the ordinance, take counsel, severally and in a
body with three or four men? And dost thou observe the Vedas? And
dost thou perceive the fruit of thy acts? And have thy wives borne
children? And has thy knowledge of scripture borne fruit? And,
descendant of Raghu, is thy intellect going the way that I have
indicated above? This course is conducive to long life, and fame; and
virtue, desire and interest. And, O child, art thou following the
course that was followed by our ancestors? And art thou maintaining
the conduct that is excellent and passes along pious ways? And, O
son of Raghu, thou dost not alone partake of sapid meats thyself
alone? And dost thou share them with those friends who expect it?
The learned king ruling (all) righteously—that chastiser of the
subjects—the monarch attaining duly the entire earth, going away
from hence, acquires the celestial regions."
SECTION CI.

Knowing Bharata as devoted to his superior Rāma along with his


brother Lakshmana, asked him, "What for is this (visit of thine unto
the woods)? I wish to hear as clearly related by thee the reason why
clad in black deerskin and wearing matted locks, thou, leaving thy
kingdom, hast come to these regions. It behoveth thee to tell me all
this." Thus accosted by the high-souled Kākutstha, Kaikeyi's son,
suppressing his grief by a strong effort, with joined hands said, "O
noble one, forsaking us all, our father possessed of mighty arms,
having performed this terrible task, in consequence of being urged
by a woman, my mother Kaikeyi, hath gone to heaven afflicted with
grief on account of his son, O repressor of foes. And she hath
committed a signal sin capable of destroying her fame. And without
obtaining the kingdom which she had coveted as the fruit of her
action, a widow tried with grief, my mother will fall into a terrible
hell. Now it behoves thee to extend thy favor unto me who have
become thy slave. Do thou this very day get thyself installed in the
kingdom, like unto Indra himself. All these subjects and our widowed
mothers have come unto thee. It behoves thee to show thy favor
unto them. Thou art the first-born; and meet it is that thou shouldst
get thyself installed, O bestower of honor. Therefore do thou receive
the kingdom righteously and fulfil the desire of thy friends. And like
the autumnal Night on having the unclouded moon, let the entire
Earth cease to be a widow on having thee, her lord. With bent head
I beseech thee along with these counsellors. It behoves thee to
show thy favor unto thy brother, disciple, and slave. Therefore, O
chief of men, thou ought not to pass by this honored band of
ancestral ministers, who have always been serving this race." Having
said this, with tears flooding his eyes, the mighty-armed son of
Kaikeyi, Bharata, again took Rāma's feet on his head. Thereupon
Rāma embracing his brother Bharata resembling a mad elephant,
and sighing again and again, said, "Of a high race, possessed of
strength, endowed with energy, and vowed unto sterling worth of
character, how can one like me commit sin for the sake of dominion?
Fault find I none ever so small in thee, thou destroyer of foes. Nor
doth it become thee from puerility to tax thy mother, O exceedingly
wise one, O thou that art sinless, superiors may act as they list in
relation to those wives and sons of theirs that are after their heart.
And this also thou shouldst learn that wives, sons and disciples
should always be obedient as has been held by the emancipated
ones. O mild one, the monarch is competent to make me stay in the
woods clad in black deer-skin, as to establish me in the monarchy.
And, O thou conversant with morality, O foremost of those observing
righteousness, in respect of virtuous conduct, a mother should be as
much regarded (by a son) as a father is. How can I, O descendant of
Raghu, having been told by my righteous father and mother—'Go to
the woods'—act otherwise? Thou ought to receive the kingdom,
Ayodhyā, honored of men; and I ought to dwell in Dandaka dressed
in bark. Having made this division of duties in the presence of all,
and also enjoined this, the mighty monarch, Daçarātha, hath
ascended heaven. That superior of all, even the virtuous king, is thy
evidence. It behoves thee to enjoy that which hath been assigned
unto thee by thy sire. And, O mild one, taking refuge in the forest of
Dandaka for fourteen years, I will act the part that hath been set
apart for me by my magnanimous father. What hath been assigned
to me by that one respected by all men, my high-souled father
resembling the lord of celestials himself, is my prime good; the
masterdom of all the worlds I would decline (should it be opposed to
the will of my sire)."
SECTION CII.

Hearing Rāma's words, Bharata answered, "Deprived of the kingdom


in consequence of my posteriority in point of birth, what doth regard
for morality avail me? O best of men, even this morality has ever
been established with reference to us, viz., that the eldest son of the
king existing, a younger one cannot be the king. Do thou, therefore,
O Rāghava go along with me to the prosperous Ayodhyā; and get
thyself installed there for the behoof of our race. Although a king
observing interest and virtue, and who towers above average
humanity, hath been called a mortal, yet to me he is a very deity.
While I was in Kekaya and thou wast in the forest, that intelligent
monarch honored of the good, given to celebrating sacrifices,
ascended heaven. As soon as thou hadst set out (for the forest)
along with Sitā and Lakshmana, the king borne down by grief and
chagrin, went to heaven. O foremost of men, do thou arise, and
offer water unto the spirit of our sire. Satrughna and I have ere this
offered water unto (the departed). O Rāghava, anything offered onto
the (manes of the) ancestors by a beloved descendant, conduces to
their eternal behoof; and thou wast the favorite of our father.
Mourning thee and exceedingly desirous of seeing thee, his mind
being fastened on thee and incapable of being turned away,
deprived of thee, and smitten with grief on thy account, thy father
departed this life, remembering thee."
SECTION CIII.

Hearing those piteous words uttered by Bharata in connection with


the demise of their father, Rāghava was deprived of his senses. And
on that thunder-bolt of a speech being uttered by Bharata, like unto
a (real) thunderbolt hurled in battle by the enemy of the Dānavas
(Indra), that subduer of foes, Rāma, stretching his arms, fell down
to the earth, like a blossoming tree that hath been hewn by an axe.
Seeing that lord of the world and mighty bowman, Rāma, fallen, like
a sleeping elephant fatigued with turning up earth with its tusks, his
brothers exercised with sorrow, broke out into lamentations, and
along with Videha's daughter began to sprinkle water (on his face).
Then regaining his consciousness, Kākutstha shedding tears from his
eyes, distressfully addressed himself to speech. And hearing that
lord of earth, his sire, had gone to heaven, that righteous one said
unto Bharata words fraught with virtue and interest, "What shall I do
with Ayodhyā, my sire having gone the way ordained by the gods?
And who will govern her, now that she hath been deprived of that
foremost of monarchs? Of fruitless birth that I am, what can I do for
that magnanimous one? And of him that renounced his life from
grief on my account. I have not even performed the last rites. Ah!
Bharata, thou, O sinless one, art blessed, since by thee as well as by
Satrughna have been performed all the funeral rites of the king. To
Ayodhyā, bereft of the monarch, having none to preside over her
destinies, and many rulers, will I not return even when the term of
my abode in the woods has been passed. My father having gone to
the other world, who, O subduer of enemies, will again counsel me
when, my stay in the forest being over, I shall have returned unto
Ayodhyā? And from whom shall I hear those words grateful unto the
ear, which my father gratifying me used to speak unto me when I
happend to do something well?" Having thus addressed Bharata,
Rāghava burning in grief, spoke unto his wife, with her countenance
resembling the full moon, saying, "O Sitā, thy father-in-law is dead
and, O Lakshmana, thou art fatherless. Bharata has communicated
unto me the sad intelligence that our father hath ascended heaven."
When Kākutstha had said this, tears began to shower forth from the
eyes of the renowned princes. Then all those brothers pacifying as
best they could Rāma stricken with sorrow, said unto him, "Do thou
perform the watery rites of that lord of the earth, our sire." Having
heard that her father-in-law, the king, had gone to the celestial
regions. Sitā with her eyes filled with tears, could not see her
beloved. Thereupon, pacifying the weeping daughter of Janaka,
Rāma moved with grief, spoke unto the distressed Lakshmana,
saying, "Do thou bring Ingudi fruits as well as a piece of new bark. I
will go to perform the watery rites of our high-souled sire. Let Sitā
go first. Do thou follow her. I shall go last. Even this is the course of
those in mourning." Then that magnanimous one, having a
knowledge of the soul, mild, graceful, capable of controlling his
senses, steady in his regard for Rāma, and ever following him—
Sumantra—in company with those sons of the king, having cheered
up Rāghava, brought him to the auspicious river, Mandākini. Then
those illustrious ones, having in distress arrived at the river
Mandākini, having convenient descents, charming, ever furnished
with blossoming woods, and of rapid currents; and approached its
descents, goodly and void of mud, offered water unto the monarch,
uttering, "May this be so!" And the protector of the earth (Rāma),
holding water with his joined hands, facing the south, said weeping,
"O foremost of monarchs, may this clear water knowing no
deterioration, reach thee, who hast gone to the world of the
ancestral manes!" Then drawing nigh unto the marge of the
Mandākini, the energetic Rāghava along with his brothers, offered
the Pinda unto his father. And placing the Ingudi Pinda mixed with
juyube on a bed of darbha Rāma crying in distress, said, "O mighty
monarch, do thou well pleased feed on this, which we also live upon.
That which is the fare of an individual, is also the fare of his
divinities." Then that foremost of men ascending the bank of the
stream by the self-same way, got up on the charming side of the hill.
And having arrived at the gate of the cottage of leaves, that lord of
the earth held both Bharata and Lakshmana with his hands. And
there the hill reverberated at the sounds raised by the brothers
wailing along with Vaidehi, like unto lions roaring. And perceiving the
loud uproar of those mighty ones engaged in offering water unto
their sire, indulging in lamentations, the army of Bharata became
agitated. And they said, "For certain Bharata hath met with Rāma;
and this mighty noise proceeds from them, as they are bitterly
mourning their deceased sire." Thereat leaving aside their vehicles,
they with one mind, rushed towards the spot wherefrom proceeded
the uproar. And of those that were tender, some went on horses,
and some on elephants, and some on ornamented chariots, while
others went on foot. And eager to behold Rāma staying away for a
short time, though seeming to do so for a long period, all the men at
once went to the hermitage. And desirous of witnessing the meeting
of the brothers (with Rāma), they with all despatch proceeded by
means of various vehicles consisting of beasts and cars. And the
ground trodden by the wheels of innumerable cars, emitted loud
sounds, like those emitted by the sky on clouds gathering. And
frightened by the uproar, elephants accompanied by female ones,
perfuming all sides (by the fragrance of temporal juice), went to
another forest. And boars, and deer, and lions, and buffalos, and
Srimaras, and tigers, and Gokarnas, Gayals and Prishatas were
striken with panic. And wild with alarm, Chakravākas and swans, and
Natyuhas, and Plavas, and Karandavas, and male coels, and
Kraunchas, fled away in all directions. And the welkin was enveloped
by birds frightened by the noise, as the earth was covered by men,
and both the sky and the land then gave out great effulgence. As
the people suddenly saw that foremost of men, the sinless and
illustrious Rāma seated on the ground, accusing Kaikeyi as well as
the vile Mantharā, the people approached Rāma, with their
countenances discovering tears. Seeing those men oppressed with
grief with their eyes filled with tears, that one cognizant of virtue like
fathers and mothers, embraced those that deserved it And he
embraced some persons; and some offered him salutations. And the
king's son, as each deserved, properly received them along with
their friends and equals in age. And the sounds, produced by those
high souled persons lamenting, resounding the earth and the sky,
and the mountain-caverns, and all the cardinal points, were heard
like peals of Mridangas.
SECTION CIV.

Desirous of seeing Rāma, Vasishtha, taking before him the wives of


Daçarātha, proceeded towards the hermitage. And as the wives of
the king were going slowly by the Mandākini, they discovered the
landing-place which was used by Rāma and Lakshmana. Thereupon
Kauçalyā, with her eyes filled with tears and her countenance
rendered pale, observed unto the forlorn Sumitrā as well as the
other wives of the king, "Sacred like unto a first wife, in this forest
this is the landing-place of those unfortunate ones of untiring
energy, who had been deprived of the kingdom. From here, O
Sumitrā, doth thy son, Saumitri, ever vigilant, personally procure
water for my son. Although thy son performeth a servile office, yet
he is not to blame: (the performance of) that alone which serves no
purpose of his brother possessed of many perfections, could bring
blame upon him. To day let thy son, who doth not deserve such
toilsome work, cease to perform that office which is fraught with
hardships fit only for the base." That lady of expansive eyes
happened to see on the earth the Ingudi pinda, which had been
placed by Rāma for his sire on the darbha with their tops pointing
southwards. Seeing this, which had been placed on the ground by
Rāma disconsolate for his sire, the noble Kauçalyā addressed all the
wives of Daçarātha, saying, "Do ye behold this that hath been duly
offered to the high-souled descendant of Raghu—lord of the
Ikshvāku race—by Rāghava. I do not deem this as fit fare for that
magnanimous monarch resembling a celestial, who had enjoyed
every luxury (in life). Having enjoyed this earth bounded by the four
seas, how can that lord of the world, resembling on earth the mighty
Indra, feed on this Ingudi pinda? Nothing appeareth to me more
deplorable in this world than this that the auspicious Rāma hath
offered an Ingudi cake unto his father. Seeing the Ingudi pinda
offered by Rāma unto his father, why doth not my heart break into a
thousand shivers? Now the tradition in vogue among men, appearth
to be true, viz., that "the fare that is partaken by a person, is also
partaken by his deity." Then those that were co-wives with her,
consoled the distressed Kauçalyā; and, (entering the asylum),
beheld Rāma like an immortal dropped from the celestial regions.
Seeing Rāma, who had been deprived of every comfort, his mothers,
overwhehhed with grief and distress, began to shed tears,
lamenting. Raising his mothers, that foremost of men, Rāma, true to
his promise, took hold of those lotus feet of theirs. And those ones
furnished with expansive eyes, (on their turn) by means of their fair
hands of delicious feel furnished with soft fingers and palms, fell to
rubbing the dust off Rāma's back. After Rāma had done, Sumitrā's
son also, seeing all his mothers, with sorrow gently paid his
reverence unto them with affection. Thereat, as they had treated
Rāma, all the ladies treated that one sprung from Daçarātha,
Lakshmana, graced with auspicious marks. Sitā also with her eyes
filled with tears, having taken hold of the feet of her mothers-in-
law, stood before them in distressful guise. Embracing that woeful
one in banishment, even as a mother doth her daughter, Kauçalyā,
smitten with grief, said, "The daughter of Videha's King, and the
daughter-in-law of Daçarātha, and the wife of Rāma himself—why
doth such a lady undergo misery in the lone forest? O Vaidehi,
beholding thy face like unto a lotus heated under the sun, or a lily
that hath been crushed, or like unto gold covered with dust, or the
moon enveloped by clouds, grief begot of this vortex of disaster that
is in my mind, fiercely burneth me, as fire consumeth a structure."
As his wretched mother was thus speaking, Bharata's elder brother,
Rāghava, approaching, took the feet of Vasishtha. Having taken hold
of the feet of the priest resembling a flame, and of accumulated
energy,—like unto that lord of the immortals, Indra, taking the feet
of Vrihaspati, Rāghava sat down with him. Then behind them (Rāma
and Vasishtha), along with his own counsellors, and principal
citizens, and generals, and persons of eminent piety,—sat the
virtuous Bharata in the presence of his elder brother. Seeing
Rāghava in the guise of an ascetic, flaming in grace, the exceedingly
powerful Bharata with joined palms sat down in company with his
brother, like the great Indra of controlled faculties in presence of
Prajapāti. "What will Bharata, having bowed unto Rāghava and paid
him homage, will say to him?" —this intense curiosity arose in (the
minds of) all the noble persons present there. And Rāghava having
truth and forbearance, and Laksmana endowed with magnanimity,
and Bharata possessed of righteousness, surrounded by their
friends, appeared (there) like unto the three fires surrounded by
Sadasyas.
SECTION CV.

As those foremost of persons surrounded by their friends indulged in


lamentations, the night passed away in grief. On the night being
succeeded by an auspicious morning, those brothers surrounded by
their friends, having performed Homa and Japa on the Mandākini,
returned unto Rāma. And sitting silent, no one said anything. Then
Bharata addressed Rāma in the midst of those friends, saying, "My
mother was (first) pacified (by grant of the kingdom.) The kingdom
is (now) mine. I grant the same unto thee. Do thou enjoy the
kingdom rid of its thorns. Like unto a dyke forced by a torrent during
the rains, this mighty monarchy is difficult of being protected save
by thee. As a mule is incapable of imitating the course of a horse, or
as birds, that of Tarkshya, I, O Lord of earth, lack the strength to
imitate thee. O Rāma, ever happy is the life of him that others
depend upon for subsistence: unhappy is the life of the person that
depends upon others for support. As a tree planted by a person, and
by him made to increase, (until at last), sending out branches, a
mighty tree, it is incapable of being got up by a dwarf; and then, if,
flowering, it show no fruits, it cannot contribute to the satisfaction of
htm for whom it hath been planted. O mighty- armed one, this
comparison is meant for thee. This189 it behoves thee to apprehend,
inasmuch as thou art our excellent lord, and thou dost not teach us
who depend upon thee for support. Let the principal orders, O
monarch, behold thee, represser of foes—established in the
kingdom, like the powerful sun himself. O Kākustha, let mad
elephants roar, with the view of following thee; and let the women
of the inner apartments with concentrated minds utter jubilation."
On hearing the words of Bharata, who was beseeching Rāma, many
of the citizens expressed their approbation by exclaiming, "Excellent
well!" Seeing the illustrious Bharata aggrieved and engaged in
lamentation, the calm and considerate Rāma consoled him, saying,
"No creature is endowed wth the power of exercising any control
over the course of events,—man has no independent status (in
nature). The Destoyer draws him both here and hereafter. Those
that increase, are destined to deteriorate; those that go upward,
ultimately fall, those that come together, separate in the end; and
life at length meets with death. As a ripe fruit hath no other fear
than fall, so man who is born, hath no other fear than death. Even
as a stout-pillared edifice, getting dilapidated, waxes weak, so men
coming under the sway of decrepitude and death, get enfeebled. A
night that hath gone by, doth not return, as the full Jamunā, when
she hath entered the ocean, doth not come back. In this world, days
and nights pass away with creatures, and speedily impair their lives,
even as in summer the rays (of the sun) (dry up) the waters. Do
thou therefore deplore thyself. Why dost thou lament any thing else?
Every one's life is decreasing, whether he sits or moves. Death goeth
with one, sitteth down with one, and, after having gone a long way,
returneth with one. The person is filled with folds in the skin, the
hair hath grown hoary, the individual is enfeebled because of age,—
by doing what, can he prevent this? People rejoice on the rising of
the sun; they feel delighted at the approach of night,—but they do
not understand that their lives have (meanwhile) been shortened.
People are exhilarated at the commencement of a new season in
novel fashion; creatures get their lives shortened at the change of
seasons. As on the mighty ocean, one piece of wood comes in
contact with another; so, a person, having been in association with
another, is seperated from him in time. In this way, wives and sons
and kindred and wealth, having been in association, go away; their
separation is certain. There exists not one in this world that can
change one's nature as received. A person lamenting a dead
individual, hath no power to prevent his own death. As, while one is
proceeding on a road, another stationed by the way, says, 'I too will
go in thy wake', even so, the way that hath been followed by our
predecessors, (must be followed as well by us.) Why should people
mourn (for deceased relatives), when they are themselves subject to
the fate that knoweth no turning? (Perceiving the destruction of) life
declining, like unto a current that never turneth back, one should
engage his soul in happiness; for all men are said to be born for the
same. My child, our righteous sire, who, after having performed
excellent and entire sacrifices, accompanied with dakshinās, hath
repaired to heaven, honored of the good, should not be mourned.190
Having renounced his human frame wasted and worn out with age,
our father hath attained celestial state, which exists in the regions of
Brahmā. Such an one should never be mourned by any wise person
like thee or myself, accomplished in learning and more than
ordinarily intelligent. Such manifold grief and mourning and
lamentation should be renounced by intelligent and firm persons in
all conditions in life. Do thou cast off this grief: let not sorrow
overpower thee. Going thither, stay in that city. And, O best of
speakers, this was also enjoined by our sire of controlled senses. I
also must do my noble father's will as to whatever that one of pious
acts has laid upon me. O subduer of foes, it is not proper for me to
pass by his orders. So thay are also worthy of being honored by
thee. He is our friend and father. O descendant of Raghu, that
mandate of our righteous father, acceptable unto me, will I obey by
abiding in the woods. O foremost of men, (good in) the next world is
capable of being attained by an honest and pious person crowned
with sterling virtues, ever following his superiors. O best of men,
thinking that our father Daçarātha has attained excellent state, do
thou, resorting to all noble qualities, seek thy welfare in the next
world." Having said these significant words unto his younger brother,
with the view of making him obey the injunctions of their father, that
lord, the magnanimous Rāma, paused.
SECTION CVI.

On Rāma having stopped after speaking these pregnant words, the


virtuous Bharata addressed the righteous Rāma attached unto his
subjects in an excellent speech on the banks of the Mandākini,
saying, "O vanquisher of foes, who is there in this world like unto
thee? Pain doth not afflict thee, nor doth pleasure exhilarate. Thyself
the exemplar of even aged people, thou referrest to them on
doubtful points (of morality). 'Living like unto dead and existing like
unto non-existing'—what shall make a person that hath attained this
intellectual state, grieve? O lord of men, he that like unto thee
understands the nature of the soul and its environment coming by
any calamity, ought not to despond. Thou resemblest, O Rāghava,
the god in strength, and art magnanimous, and truthful in promise!
and knowest every thing and art endued with intelligence. Calamity,
however unbearable it may be, should not overpower a person like
thyself furnished with such virtues and cognizant of life and death.
The sin that in my absence from home hath been perpetrated by my
mean-minded mother doth not find favor in my sight. Be thou
therefore propitous to me. I am bound by the fetters of religion. For
this it is that I do not by a severe penalty slay my wicked mother
deserving of chastisement. How having sprung from Daçarātha of
righteous deeds and born of immaculate race, and knowing virtue
and vice, can I commit such a reprehensible action? Daçarātha is our
superior, of meritorious acts, aged our king, a departed spirit, and
our father, it is on account of this that I do not censure our father
who is a deity unto us. O cognizant of virtue, what virtuous person
conversant in morality, should, seeking the pleasure of his wife,
commit such a sinful act devoid of both righteousness and interest?
'Creatures, as their end approaches, lose their sense' this ancient
adage has been illustrated in the world by the course the king has
taken. Do thou, intent upon bringing about good, redeem the wrong
that hath been done by our sire through anger, ignorance and
recklessness. The son that repaireth the wrong done by his father by
acting contrary to the latter is in this world considered really a son;
but not he that acteth otherwise. Be thou that (real) son (of the
monarch). Do thou not approve the action of thy father, since what
he has done is divorced from righteousness and is blameworthy. Do
thou rescue all these— Kaikeyi, myself, my father, our friends and
adherents, and the whole body of the citizens as well as the
inhabitants of the provinces. Where is the forest? And where is
Kshatriya morality? Where are matted locks? And where is thy
government of the country? It behoves thee not to act in such an
untoward way. Even this is the first duty of a Kshatriya, viz.,—getting
oneself installed,—by means of which, O highly wise one, he can
compass the government of the people. What base Kshatriya setting
aside this indubitable morality, resorts to a dubious and inaupicious
course, which should be followed by the old alone? But if thou be
bent upon practising this austere morality, do thou undergo this
trouble, after having righteously ruled the four orders. O thou
cognizant of morality, those versed in duty say that of the four
modes of life, the life of the householder is the foremost. Why then
dost thou wish to renounce the same? I am inferior to thee in
learning, in position, and in birth. How can I then govern the earth,
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like