<?php $ui_style_default = _hui('ui_style_default', 'card'); $ui_color_default = _hui('ui_color_default', 'light'); $ui_user_switch = _hui('ui_user_switch', true); $html_classes = array(); if ($ui_style_default) { $html_classes[] = 'ui-style-' . $ui_style_default; } if ($ui_color_default) { $html_classes[] = 'ui-color-' . $ui_color_default; } if (_hui('idark_default') || (_hui('idark') && _tb_is_dark())) { $html_classes[] = 'darking'; } $html_class_attr = $html_classes ? ' class="' . esc_attr(implode(' ', $html_classes)) . '"' : ''; $html_data_attr = (_hui('idark') && _tb_is_night()) ? ' data-night="1"' : ''; ?> <!DOCTYPE HTML> <html lang="<?php echo tb_get_lang() ?>"<?php echo $html_class_attr . $html_data_attr; ?>> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> <meta name="apple-mobile-web-app-title" content="<?php echo get_bloginfo('name') ?>"> <meta http-equiv="Cache-Control" content="no-siteapp"> <script> (function(){var a=<?php echo $ui_user_switch ? 'true' : 'false'; ?>,s="<?php echo esc_js($ui_style_default); ?>",c="<?php echo esc_js($ui_color_default); ?>",r=document.documentElement;if(r.classList.contains("ui-style-simple")){s="simple"}else if(r.classList.contains("ui-style-flat")){s="flat"}else if(r.classList.contains("ui-style-card")){s="card"}if(r.classList.contains("ui-color-dark")||r.classList.contains("darking")){c="dark"}else if(r.classList.contains("ui-color-light")){c="light"}if(a){var ls=localStorage.getItem("dux-ui-style"),lc=localStorage.getItem("dux-ui-color");if(ls){s=ls}if(lc){c=lc}}r.classList.remove("ui-style-simple","ui-style-card","ui-style-flat");r.classList.remove("ui-color-light","ui-color-dark");if(s){r.classList.add("ui-style-"+s)}if(c){r.classList.add("ui-color-"+c)}if(c==="dark"){r.classList.add("darking")}if(c==="light"){r.classList.remove("darking")}})(); </script> <title><?php echo _title(); ?></title> <?php wp_head(); ?> <link rel="shortcut icon" href="<?php echo home_url() . '/favicon.ico' ?>"> </head> <body <?php body_class(_bodyclass()); ?>> <?php do_action('dux_header_before') ?> <header class="header"> <div class="container"> <?php _the_logo(); ?> <?php $_brand = _hui('brand'); if ($_brand) { $_brand = explode("\n", $_brand); echo '<div class="brand">' . $_brand[0] . '<br>' . (isset($_brand[1]) ? $_brand[1] : '') . '</div>'; } ?> <?php if( !_hui('idark_default') && _tb_idark() !== false ){ ?> <div class="sitedark" etap="darking"><i class="tbfa">&#xe6a0;</i><i class="tbfa">&#xe635;</i></div> <?php } ?> <?php if (_hui('ui_user_switch', true) && _hui('ui_switcher_s', true)) { ?> <div class="ui-switcher"> <div class="ui-switcher-group"> <button type="button" data-type="style" data-value="simple">简洁</button> <button type="button" data-type="style" data-value="card">卡片</button> <button type="button" data-type="style" data-value="flat">扁平</button> </div> <div class="ui-switcher-group"> <button type="button" data-type="color" data-value="light">浅色</button> <button type="button" data-type="color" data-value="dark">暗色</button> </div> </div> <?php } ?> <?php if (!is_search() && ((_hui('pc_search') && !wp_is_mobile()) || (_hui('m_search') && wp_is_mobile()))) { ?> <?php if(_hui('search_type_icon',true) || (!_hui('search_type_icon',true)&&_hui('m_search') && wp_is_mobile())){ ?> <div class="navto-search search-show"><i class="tbfa">&#xe611;</i></div> <?php }else{ ?> <?php get_search_form() ?> <?php } ?> <?php } ?> <ul class="site-nav site-navbar"> <?php _the_menu((wp_is_mobile() && has_nav_menu('nav_m')) ? 'nav_m' : 'nav') ?> </ul> <?php if (!_hui('topbar_off')) { ?> <div class="topbar"> <ul class="site-nav topmenu"> <?php _the_menu('topmenu') ?> <?php if (_hui('guanzhu_b')) { ?> <li class="menusns menu-item-has-children"> <a href="javascript:;"><?php echo _hui('sns_txt') ?></a> <ul class="sub-menu"> <?php if (_hui('wechat')) { echo '<li><a class="sns-wechat" href="javascript:;" title="' . _hui('wechat') . '" data-src="' . _hui('wechat_qr') . '">' . _hui('wechat') . '</a></li>'; } ?> <?php for ($i = 1; $i < 10; $i++) { if (_hui('sns_tit_' . $i) && _hui('sns_link_' . $i)) { echo '<li><a target="_blank" rel="external nofollow" href="' . _hui('sns_link_' . $i) . '">' . _hui('sns_tit_' . $i) . '</a></li>'; } } ?> </ul> </li> <?php } ?> </ul> <?php if (_hui('topbar_sign', 'on')) : ?> <?php if (function_exists('tbm_on') && tbm_on()) : ?> <?php do_action('tbm_sign_text', 'dux') ?> <?php if (current_user_can('publish_posts')) { ?> &nbsp; &nbsp; <a rel="nofollow" target="_blank" href="<?php echo site_url('/wp-admin/') ?>"><?php _e('后台管理', 'TBL') ?></a> &nbsp; &nbsp; <a rel="nofollow" target="_blank" href="<?php echo site_url('/wp-admin/post-new.php') ?>"><?php _e('写文章', 'TBL') ?></a> <?php if (is_single() || is_page()) { ?> &nbsp; &nbsp; <?php edit_post_link(__('[编辑]', 'TBL')) ?> <?php } ?> <?php } ?> <?php elseif (is_user_logged_in()) : global $current_user; ?> <?php _moloader('mo_get_user_page', false) ?> Hi, <?php echo $current_user->display_name ?> <?php if (_hui('user_page_s')) { ?> &nbsp; &nbsp; <a rel="nofollow" href="<?php echo mo_get_user_page() ?>"><?php _e('进入会员中心', 'TBL') ?></a> <?php } ?> <?php if (current_user_can('publish_posts')) { ?> &nbsp; &nbsp; <a rel="nofollow" target="_blank" href="<?php echo site_url('/wp-admin/') ?>"><?php _e('后台管理', 'TBL') ?></a> &nbsp; &nbsp; <a rel="nofollow" target="_blank" href="<?php echo site_url('/wp-admin/post-new.php') ?>"><?php _e('写文章', 'TBL') ?></a> <?php if (is_single() || is_page()) { ?> &nbsp; &nbsp; <?php edit_post_link(__('[编辑]', 'TBL')) ?> <?php } ?> <?php } ?> <?php elseif (_hui('user_page_s')) : ?> <a rel="nofollow" href="javascript:;" class="signin-loader"><?php _e('Hi, 请登录', 'TBL') ?></a> &nbsp; &nbsp; <a rel="nofollow" href="javascript:;" class="signup-loader"><?php _e('我要注册', 'TBL') ?></a> &nbsp; &nbsp; <a rel="nofollow" href="<?php echo mo_get_user_rp() ?>"><?php _e('找回密码', 'TBL') ?></a> <?php else : ?> <a rel="nofollow" href="<?php echo esc_url(wp_login_url(get_permalink())) ?>"><?php _e('Hi, 请登录', 'TBL') ?></a> &nbsp; &nbsp; <a rel="nofollow" href="<?php echo wp_registration_url() ?>"><?php _e('我要注册', 'TBL') ?></a> &nbsp; &nbsp; <a rel="nofollow" href="<?php echo wp_lostpassword_url() ?>"><?php _e('找回密码', 'TBL') ?></a> <?php endif; ?> <?php endif; ?> </div> <?php } ?> <?php if (_hui('user_page_s') || (function_exists('tbm_on') && tbm_on())) { ?> <?php if (!is_user_logged_in()) { ?> <?php if (function_exists('tbm_on') && tbm_on()) : ?> <a rel="nofollow" href="javascript:;" class="m-icon-user" tbm-event="login"><i class="tbfa">&#xe641;</i></a> <?php else : ?> <a rel="nofollow" href="javascript:;" class="signin-loader m-icon-user"><i class="tbfa">&#xe641;</i></a> <?php endif; ?> <?php } else { ?> <?php _moloader('mo_get_user_page', false) ?> <a rel="nofollow" href="<?php echo mo_get_user_page() ?>" class="m-icon-user"><i class="tbfa">&#xe641;</i></a> <?php } ?> <?php } ?> </div> </header> <?php if (_hui('m_navbar')) { ?> <div class="m-icon-nav"> <i class="tbfa">&#xe612;</i> <i class="tbfa">&#xe606;</i> </div> <?php } ?> <div class="site-search"> <div class="container"> <?php get_search_form() ?> </div> </div> <?php if (is_single() && _hui('breadcrumbs_single_s') && hui_breadcrumbs()) { ?> <div class="breadcrumbs"> <div class="container"><?php echo hui_breadcrumbs() ?></div> </div> <?php } ?> <?php $ads_site_01_on = true; if (is_page_template('pages/navs.php') || is_page_template('pages/user.php') || is_page_template('pages/resetpassword.php')) { $ads_site_01_on = false; } $ads_site_01_on && _the_ads($name = 'ads_site_01', $class = 'orbui-site orbui-site-01'); ?> <?php do_action('dux_header_after') ?>

Learn Vim: The Smart Way

Learn Vim: The Smart Way
by: Igor Irianto

  • 261

    PAGES

  • 45 DAYS

    GUARANTEE

  • ENGLISH

  • PDF

  • EPUB

  • MOBI

  • WEB

The best place to learn Vim is Vim. Both vimtutor and the help file have everything you ever need. However,the average user needs something more than vimtutor and less than the help file.
Learn-Vim is an opinionated guide to learn the most useful parts of Vim in the least time possible. If you want to learn Vim and Vimscript,this is for you.
The average Vim user needs something more than vimtutor and less than the help manual. This guide attempts to bridge that gap by: highlighting only the key features to learn the most useful parts of Vim in the least time possible.
Chances are you won’t need all 100% of Vim features. You probably only need to know about 20% to become a powerful Vimmer. This guide will show you which Vim features you will find most useful.
This is an opinionated guide. It covers techniques that I often use when using Vim. The chapters are sequenced based on what I think would make the most logical sense for a beginner to learn Vim.
This guide is examples-heavy. When learning a new skill,examples are indispensable,having numerous examples will solidify the concepts more effectively.
You can read this guide online here entirely for free.
Purchasing this guide will keep this project sustainable and support future guides.
Some of you may wonder why do you need to learn Vimscript? In my first year of using Vim,I was content with just knowing how to use Vim. Time passed and I started needing Vimscript more and more to write custom commands for my specific editing needs. As you are mastering Vim,you will sooner or later need to learn Vimscript. So why not sooner? Vimscript is a small language. You can learn its fundamentals in just four chapters of this guide.
You can go far using Vim without knowing any Vimscript,but knowing it will help you excel even farther.
This guide is written for both beginner and advanced Vimmers. It starts out with broad and simple concepts and ends with specific and advanced concepts. If you’re an advanced user already,I would encourage you to read this guide from start to finish anyway,because you will learn something new!
Table of Contents
New To Vim? Read This First
Ch01. Starting Vim
Ch02. Buffers,Windows,and Tabs
Ch03. Searching Files
Ch04. Vim Grammar
Ch05. Moving In A File
Ch06. Insert Mode
Ch07. The Dot Command
Ch08. Registers
Ch09. Macros
Ch10. Undo
Ch11. Visual Mode
Ch12. Search And Substitute
Ch13. The Global Command
Ch14. External Commands
Ch15. Command-line Mode
Ch16. Tags
Ch17. Fold
Ch18. Git
Ch19. Compile
Ch20. Views,Sessions,And Viminfo
Ch21. Vimrc
Ch22. Vim Packages
Ch23. Vim Runtime
Ch24. Vimscript Basic Data Types
Ch25. Vimscript Conditionals And Loops
Ch26. Vimscript Variables And Scopes
Ch27. Vimscript Functions

下载地址 Download请完成验证以访问链接!
打赏
未经允许不得转载:finelybook » Learn Vim: The Smart Way

评论 抢沙发

觉得文章有用就打赏一下文章作者

您的打赏,我们将继续给力更多优质内容

支付宝扫一扫

微信扫一扫