Vim is one of the most powerful and popular command line text editors around. विम सबसे ताकतवर और लोकप्रिय में से एक कमांड लाइन पाठ संपादक के आसपास है. It was initially only available for the Linux and UNIX platforms, but was then ported to Windows also. यह था शुरू Linux और UNIX प्लेटफार्म के लिए ही उपलब्ध है, लेकिन फिर Windows पर रखी थी भी. The interface is clean and simple, and you use a combination of keys to perform tasks such as copy-paste, search and replace, delete a bunch of lines, and much more. इंटरफ़ेस स्वच्छ और सरल है, और तुम चाबियाँ के संयोजन का उपयोग इस तरह की नकल के रूप में कार्य-पेस्ट, खोज और स्थान, लाइनों का एक समूह को हटाना, और बहुत कुछ.
Vim comes pre-installed with most distributions of Linux and on Mac OS. विम पूर्व Linux के सर्वाधिक वितरण और मैक ओएस पर स्थापित के साथ आता है. In case you don't have it or want to install it on another platform you can get the installer from मामले में तुम यह नहीं है या उसे एक और मंच आप इंस्टॉलर से प्राप्त कर सकते हैं पर स्थापित करना चाहते हैं here यहां . . For Windows users you need to go विंडोज उपयोगकर्ताओं को आप जाने की जरूरत के लिए here यहां and download the latest release of Vim. और विम का नवीनतम जारी डाउनलोड करें. Download the zip file for your version of Windows and extract it. डाउनलोड ज़िप Windows के अपने संस्करण और उसे निकालने के लिए फ़ाइल. Then run the installer. तो इंस्टॉलर चला रहे हैं. The only thing different between the Linux/Mac version of Vim and the Windows version is that the Windows version runs in its own graphical window. केवल लिनक्स के बीच अलग बात है / विम के मैक संस्करण और Windows संस्करण है कि Windows संस्करण अपनी चित्रमय विंडो में चलाता है. Let's take a closer look at its usage. चलो इसके उपयोग में एक करीब देखो.
Before we get to the actual usage of Vim let me briefly explain to you the two modes that Vim runs in – command and insert mode. इससे पहले कि हम विम के वास्तविक उपयोग करने के लिए मुझे कुछ समय आप दो तरीके हैं कि विम में रन - कमान और डालने के मोड समझाओ. In the command mode you give instructions to Vim to take some action, such as delete a line, or search for a word. आदेश मोड में आप विम को निर्देश देने के लिए कुछ कदम ऐसे एक पंक्ति, या एक शब्द के लिए खोज हटाने के रूप में, ले. When you are in the insert mode what you type goes in as text into the document you are editing. तुम डालने के मोड क्या आप टाइप में चला जाता है जब हैं पाठ के रूप में दस्तावेज़ को आप संपादित कर रहे हैं में. When you launch Vim you are in the command mode. तुम विम आप कमांड के रूप में कर रहे हैं जब प्रक्षेपण. To switch to insert mode hit the 'i' key on your keyboard. करने के लिए मोड डालने के स्विच अपने कुंजीपटल पर '' मैं चाबी मारा. You will see a notification at the bottom left of your screen like this: तुम इस तरह अपनी स्क्रीन की बाईं तल पर एक सूचना दिखाई देगा:
– INSERT – INSERT - --
This means you can now begin editing the file. इसका मतलब यह है अब तुम संपादन फ़ाइल शुरू कर सकते हैं. To switch back to the command mode just hit the Escape key. के आदेश मोड पर वापस स्विच बस एस्केप प्रमुख मारा. You will find that the “– INSERT –” notification at the bottom will disappear. तुम उस नीचे "INSERT - - अधिसूचना" होगा गायब हो पाएंगे. You are now in the command mode and can instruct Vim to delete a line, or to save the file, or whatever you may want to do with the document. तुम आदेश मोड में हैं और विम शिक्षा को एक पंक्ति, या फ़ाइल, या जो भी आप दस्तावेज़ के साथ क्या कर सकते हैं बचाने के लिए हटा सकते हैं.
To open an existing file or a to create a new one with Vim use the following syntax: किसी मौजूदा फ़ाइल या विम निम्नलिखित वाक्य रचना का प्रयोग के साथ एक नया बनाने के लिए खोलने के लिए:
# vim helloworld.txt # शक्ति helloworld.txt
If you opened an existing file you should see its content, or a blank page if you created a new one. यदि आप एक मौजूदा फ़ाइल आप अपनी सामग्री, या किसी रिक्त पृष्ठ को देखने के लिए कि आप एक नया बनाया जाना चाहिए खोला. Now before we proceed with using Vim, let's see how to exit Vim. अब इससे पहले कि हम विम का उपयोग कर के साथ आगे बढ़ना, देखते हैं कैसे विम निकास के लिए. This is important because, unlike your standard graphical text editor, you cannot close the window to shut the application. यह महत्वपूर्ण है, क्योंकि अपने मानक चित्रमय पाठ संपादक के विपरीत, आप विंडो को बंद करने के लिए नहीं अनुप्रयोग बंद कर सकता है. To exit Vim and return to the command line you need to enter the following key combination: को विम और आदेश पंक्ति आपको निम्न कुंजी संयोजन दर्ज करने की आवश्यकता पर वापस बाहर निकलें:
ESC :q ENTER ईएससी: क्ष ENTER
In plain English the above command goes something like this, “Escape key, then a colon, followed immediately by a 'q', and then the Enter key to finish”. सादे अंग्रेजी संस्करण की कमान में कुछ इस तरह होता है, "भागो कुंजी है, तो एक बृहदान्त्र, 'एक' क्ष, और फिर कुंजी दर्ज करें को खत्म करने के तुरंत बाद." The “q” here stands for “quit”. "क्ष" यहाँ 'के लिए खड़ा छोड़ दिया. " What Vim does here is that it exits without saving any changes you may have made to the file. क्या विम यहाँ करता है कि यह किसी भी परिवर्तन आप फाइल को बना सकते हैं बचाने के रास्ते के बिना. To save the file and quit add the 'w' or “write” option: पर फ़ाइल सहेजें और 'w' या जोड़ छोड़ "लिख" विकल्प:
ESC :wq ENTER ईएससी: wq ENTER
You can also use the 'w' option without the 'q', if you just want to save the file while editing it and not quit Vim. तुम भी बिना 'w' विकल्प का उपयोग कर सकते हैं '' क्ष, अगर तुम बस फाइल को बचाने के संपादित करते समय यह और नहीं विम इस्तीफा चाहते हैं.
Now that we know how to get in an out of Vim let's see how to use it. अब जब कि हम जानते हैं कि कैसे एक बाहर के विम में देखते हैं कि यह कैसे उपयोग करने के लिए है. Let's create a new document with Vim and begin writing: चलो विम के साथ एक नया दस्तावेज़ बनाने और लेखन शुरू:
# vim newdocument.txt # शक्ति newdocument.txt
Now hit 'i' on your keyboard to get into the insert mode. अब 'हिट मैं अपने कुंजीपटल पर डालने के मोड में पाने के लिए. Write a few lines of text in the file. फ़ाइल में पाठ की कुछ पंक्तियां लिखें. Once you are done hit the Escape key to go into the command mode, and then “:wq” to save and exit the file. एक बार तुम किया एस्केप महत्वपूर्ण हिट को आदेश मोड में जा रहे हैं, और फिर ": wq" और बचाने के लिए फ़ाइल बाहर निकलें. Now let's see if the file was written correctly. अब देखते हैं तो फ़ाइल सही ढंग से लिखा गया था. Windows users can open the document we created using Notepad. विंडोज उपयोगकर्ताओं को दस्तावेज़ हम Notepad का उपयोग कर बनाया खोल सकते हैं. If you are using Linux or a Mac run the following command to check out the contents of the file: यदि आप लिनक्स या मैक का उपयोग कर रहे निम्न कमांड को फाइल की सामग्री की जांच चलाने:
# cat newdocument.txt # बिल्ली newdocument.txt
You should see the contents of the file you just created. तुम तुम अभी बनाया फ़ाइल की सामग्री को देखना चाहिए. Now open the same file using Vim and let's see what more Vim do do. अब एक ही विम का उपयोग कर फ़ाइल को खोलने और देखते हैं और क्या विम करते. Let's delete a few words and lines. चलो कुछ शब्द और लाइनें हटा दें. While in command mode navigate you cursor to he beginning of a word and hit the key combination “dw” followed by Enter. जबकि आदेश मोड में आप वह एक शब्द की शुरुआत और कुंजी संयोजन "DW" प्रविष्ट करें बाद मारा पर जाएँ कर्सर. This should delete the word. इस शब्द को हटाना चाहिए. Now let's delete a whole line. अब चलो एक पूरी लाइन हटा दें. Pick a line you want to delete and take the cursor to any location in that line and hit the key combination “dd” followed by Enter. एक पंक्ति को आप हटाना और कि पंक्ति में किसी भी स्थान पर कर्सर ले और कुंजी संयोजन "डीडी" प्रविष्ट करें बाद मारा चाहते उठाओ. Line deleted. लाइन नष्ट कर दिया.
Sometimes you make a mistake that you want to undo, say you want to bring back the line you just deleted. कभी कभी तुम एक गलती है कि आप को पूर्ववत करने कहना चाहते हैं, तो आप वापस लाइन तुम बस नष्ट लाना चाहता हूँ. To undo your last action go to the command mode and hit the key “u”. आपका अंतिम कार्रवाई आदेश मोड में जाने के पूर्ववत करें और प्रमुख यू "मारा". You can continue hitting “u” to undo more changes. आप "U" मारने के लिए और अधिक परिवर्तन पूर्ववत जारी रख सकते हैं.
These commands will get you started with Vim. इन कमांड मिलेगा आप विम के साथ शुरू किया था. Practice what you learned here. अभ्यास तुम यहाँ क्या सीखा है. I will return with more cool stuff such as finding and replacing words, searching a text, and more. मैं और अधिक शांत सामान के साथ ऐसे लग रहा है और शब्दों की जगह के रूप में वापसी, एक पाठ खोज करेंगे, और अधिक.
A quick recap of the commands you learned here: कमांड तुम यहाँ सीखा की जल्दी आवृत्ति:
1. 1. Save file – “:w” फ़ाइल सहेजें - ": w"
2. 2. Quit file without saving – “:q” छोड़ बचाने के बिना फ़ाइल - ": क्ष"
3. 3. Save and quit file – “:wq” सहेजें और फ़ाइल छोड़ - ": wq"
4. 4. Go into insert mode – “i” डालने के मोड में जाओ - "मैं"
5. 5. Go into command mode – ESC कमांड मोड में जाओ - ईएससी
6. 6. Delete word – “dw” हटाएँ शब्द - "DW"
7. 7. Delete line – “dd” पंक्ति हटाएँ - "दूरदर्शन"
8. 8. Undo change – “u” पूर्ववत करें परिवर्तन - "U"
























Come on ! चलो! Is there someone who still use vi (& its clones) ? कोई है जो अभी भी उपयोग है vi (अपने क्लोन) और? There's hundred of editors out there who can ease much more the work for a writer…!!! वहाँ वहाँ बाहर संपादकों के सौ जो अधिक एक लेखक के लिए काम करना कम कर सकते हैं ...!!
Yeah, I know you can do more with Vi than any other editor, but believe me you still have to memorize a bunch of keyboard keys… हाँ, मुझे पता है कि तुम vi के साथ और अधिक कर सकता है किसी अन्य संपादक से अधिक है, लेकिन मुझे तुम पर विश्वास भी है कि कुंजीपटल चाबियों का गुच्छा एक याद ...
compliments for a very useful start, but i'm unable to find the rest of the tutorial? एक बहुत ही उपयोगी शुरुआत के लिए तारीफ की, लेकिन मैं ट्यूटोरियल के शेष नहीं ढूँढ पा रहा हूँ?
lam जबह