当前位置: 首页 > news >正文

一般网站建设的流程一个不懂技术的人如何做网站

一般网站建设的流程,一个不懂技术的人如何做网站,男子公众号下单做防水补漏,建立一个网站赚钱了Termux配置Vim C开发环境#xff0c;打造基于终端命令行的IDE 主要利用VimCoc插件#xff0c;配置C的代码提示等功能。 Termux换源 打开termux#xff0c;输入termux-change-repo 找到mirrors.tuna.tsinghua.edu.cn#xff0c;清华源#xff0c;空格选中#xff0c;回…Termux配置Vim C开发环境打造基于终端命令行的IDE 主要利用VimCoc插件配置C的代码提示等功能。 Termux换源 打开termux输入termux-change-repo 找到mirrors.tuna.tsinghua.edu.cn清华源空格选中回车确认 Termux配置ssh 有了ssh后就可以方便的在PC或者其它平台上使用ssh工具远程termux终端了 # 安装 apt install open-ssh # 启动sshd默认端口为8022 sshd # 关闭sshd pkill sshd # 查看sshd是否运行 ps aux | grep sshd默认没有密码使用passwd命令配置密码 ssh user192.168.0.11 -p 8022user用户名可以用whoami命令查看一般termux用户名为u0_xxxx 软件包管理简介 termux使用pkg管理软件包并且可以使用apt别名 例如更新仓库和软件 pkg update apt update pkg upgrade apt upgrade两个命令都可以apt命令对使用过Debian的人非常友好。以下全部使用apt 安装命令就是 apt install xxx安装基础软件 vim编辑器clangC编译器并且提供了g别名cmake管理C项目配置git源码仓库工具nodejsC开发很少用到nodejs主要是为vim插件提供运行环境python3提供环境 apt install vim clang cmake git nodejs python3Vim基础配置 主要配置缩进、tab空格、文件编码、行号等可以根据自己的需求配置 配置项非常少很基础 vim .vimrc编辑.vimrc文件将以下内容输入 vim base config set nocompatible syntax on set showmode set showcmd set encodingutf-8 set t_Co256 filetype indent on set softtabstop4 set tabstop4 set shiftwidth4 set expandtab set autoindent set number set cursorline安装Vim插件 VimPlug用来管理Vim插件之后的插件都需要用它来安装vim-code-darkVsCode主题 VimPlug插件管理 VimPlug主页提供了安装方法 复制下面的命令到终端并执行 curl -fLo ~/.vim/autoload/plug.vim --create-dirs \https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim安装完成后编辑.vimrc文件添加如下代码段 plugin call plug#begin()Plug xxxcall plug#end()中间的Plug xxx就是代表安装xxx插件每个插件一行 每当想安装新的插件时先编辑vimrc再重新进入vim命令模式输入:PlugInstall就会安装插件 卸载插件时编辑vimrc删除插件那一行然后进入vim命令模式输入:PlugClean不在列表里的插件就会被清理 :PlugUpdate更新插件 :PlugUpgrade更新VimPlug本身 VsCode颜色主题 Vim自己的高亮不好看我选择了VsCode主题 Plug tomasiser/vim-code-dark添加上述代码重新打开vim并运行PlugInstall出现Finishing … Done!且插件名称后面显示100%时说明安装成功 再次编辑vimrc添加如下代码 colorscheme codedark再次打开vim时已经变为VsCode主题 Coc代码提示 参考Coc主页安装方式如下 Plug neoclide/coc.nvim, {branch: release}同样运行:PlugInstall就可以安装Coc依赖于NodeJs Coc是类似VimPlug的管理工具具体的语言支持还需要安装语言包 其插件列表可以在CocWiki看到 注意这里的插件指的是Coc插件他们往往都按照coc-xxx命名例如coc-clangd、coc-json等 安装插件需要使用:CocInstall命令例如 CocInstall coc-json coc-tsserverCoc也需要配置配置很多我也没看明白官网给了一个示例主要是配置快捷键补全等功能。 对于C开发环境需要的Coc插件有 coc-clangd提供C语言服务支持coc-cmake提供cmake支持 coc-clangd 安装coc-clangd依赖于clangd在termux中使用apt install clang来安装 :ConInstall coc-clangd安装完成后可以编辑一个cpp文件尝试效果Tab用来选择候选项Enter用来确认 对于多文件项目或者CMake项目插件需要读取compile_commands.json文件这个文件需要在编译时生成。 CMake在构建项目时生成该文件指令为 cmake -S . -B build -DCMAKE_BUILD_TYPEDebug -DCMAKE_EXPORT_COMPILE_COMMANDSTRUE-S指定源代码文件夹-B指定输出目录-DCMAKE_BUILD_TYPE设置构建类型-DCMAKE_EXPORT_COMPILE_COMMANDS指定生成compile_commands.json文件 coc-cmake 依赖cmake lsp pip install cmake-language-server:CocInstall coc-cmake然后就可以使用了 括号补全 使用auto-pairs插件 Plug jiangmiao/auto-pairs无需任何配置 代码格式化 使用vim-clang-format插件参考其主页安装 依赖于clang-format在Termux下安装clang就行 Plug rhysd/vim-clang-format安装完成后可以参考如下代码或者ClangFormat主页配置格式化风格 let g:clang_format#code_styleWebKit格式化命令为:ClangFormat 为了方便把CtrlShifti映射为该命令在常规模式下有效 nnoremap C-S-i :ClangFormatCR缩进参考线 indentLine插件 Plug Yggdroot/indentLine无需配置 最终vimrc源码 vim base config set nocompatible syntax on set showmode set showcmd set encodingutf-8 set t_Co256 filetype indent on set softtabstop4 set tabstop4 set shiftwidth4 set expandtab set autoindent set number set cursorline vim plug call plug#begin()Plug tomasiser/vim-code-dark Plug neoclide/coc.nvim, {branch: release} Plug jiangmiao/auto-pairs Plug rhysd/vim-clang-format Plug Yggdroot/indentLinecall plug#end() vscode theme colorscheme codedarkClang Format let g:clang_format#code_styleWebKit nnoremap C-S-i :ClangFormatCR Coc Config Use tab for trigger completion with characters ahead and navigateNOTE: Theres always complete item selected by default, you may want to enableno select by suggest.noselect: true in your configuration fileNOTE: Use command :verbose imap tab to make sure tab is not mapped byother plugin before putting this into your config inoremap silentexpr TAB\ coc#pum#visible() ? coc#pum#next(1) :\ CheckBackspace() ? \Tab :\ coc#refresh() inoremap exprS-TAB coc#pum#visible() ? coc#pum#prev(1) : \C-h Make CR to accept selected completion item or notify coc.nvim to formatC-gu breaks current undo, please make your own choice inoremap silentexpr CR coc#pum#visible() ? coc#pum#confirm()\: \C-gu\CR\c-rcoc#on_enter()\CRfunction! CheckBackspace() abortlet col col(.) - 1return !col || getline(.)[col - 1] ~# \s endfunction Use c-space to trigger completion if has(nvim)inoremap silentexpr c-space coc#refresh() elseinoremap silentexpr c- coc#refresh() endif Use [g and ]g to navigate diagnosticsUse :CocDiagnostics to get all diagnostics of current buffer in location list nmap silent [g Plug(coc-diagnostic-prev) nmap silent ]g Plug(coc-diagnostic-next) GoTo code navigation nmap silent gd Plug(coc-definition) nmap silent gy Plug(coc-type-definition) nmap silent gi Plug(coc-implementation) nmap silent gr Plug(coc-references) Use K to show documentation in preview window nnoremap silent K :call ShowDocumentation()CRfunction! ShowDocumentation()if CocAction(hasProvider, hover)call CocActionAsync(doHover)elsecall feedkeys(K, in)endif endfunction Highlight the symbol and its references when holding the cursor autocmd CursorHold * silent call CocActionAsync(highlight) Symbol renaming nmap leaderrn Plug(coc-rename) Formatting selected code xmap leaderf Plug(coc-format-selected) nmap leaderf Plug(coc-format-selected)augroup mygroupautocmd! Setup formatexpr specified filetype(s)autocmd FileType typescript,json setl formatexprCocAction(formatSelected) Update signature help on jump placeholderautocmd User CocJumpPlaceholder call CocActionAsync(showSignatureHelp) augroup end Applying code actions to the selected code blockExample: leaderaap for current paragraph xmap leadera Plug(coc-codeaction-selected) nmap leadera Plug(coc-codeaction-selected) Remap keys for applying code actions at the cursor position nmap leaderac Plug(coc-codeaction-cursor)Remap keys for apply code actions affect whole buffer nmap leaderas Plug(coc-codeaction-source)Apply the most preferred quickfix action to fix diagnostic on the current line nmap leaderqf Plug(coc-fix-current) Remap keys for applying refactor code actions nmap silent leaderre Plug(coc-codeaction-refactor) xmap silent leaderr Plug(coc-codeaction-refactor-selected) nmap silent leaderr Plug(coc-codeaction-refactor-selected) Run the Code Lens action on the current line nmap leadercl Plug(coc-codelens-action) Map function and class text objectsNOTE: Requires textDocument.documentSymbol support from the language server xmap if Plug(coc-funcobj-i) omap if Plug(coc-funcobj-i) xmap af Plug(coc-funcobj-a) omap af Plug(coc-funcobj-a) xmap ic Plug(coc-classobj-i) omap ic Plug(coc-classobj-i) xmap ac Plug(coc-classobj-a) omap ac Plug(coc-classobj-a) Remap C-f and C-b to scroll float windows/popups if has(nvim-0.4.0) || has(patch-8.2.0750)nnoremap silentnowaitexpr C-f coc#float#has_scroll() ? coc#float#scroll(1) : \C-fnnoremap silentnowaitexpr C-b coc#float#has_scroll() ? coc#float#scroll(0) : \C-binoremap silentnowaitexpr C-f coc#float#has_scroll() ? \c-rcoc#float#scroll(1)\cr : \Rightinoremap silentnowaitexpr C-b coc#float#has_scroll() ? \c-rcoc#float#scroll(0)\cr : \Leftvnoremap silentnowaitexpr C-f coc#float#has_scroll() ? coc#float#scroll(1) : \C-fvnoremap silentnowaitexpr C-b coc#float#has_scroll() ? coc#float#scroll(0) : \C-b endif Use CTRL-S for selections rangesRequires textDocument/selectionRange support of language server nmap silent C-s Plug(coc-range-select) xmap silent C-s Plug(coc-range-select) Add :Format command to format current buffer command! -nargs0 Format :call CocActionAsync(format) Add :Fold command to fold current buffer command! -nargs? Fold :call CocAction(fold, f-args) Add :OR command for organize imports of the current buffer command! -nargs0 OR :call CocActionAsync(runCommand, editor.action.organizeImport) Add (Neo)Vims native statusline supportNOTE: Please see :h coc-status for integrations with external plugins thatprovide custom statusline: lightline.vim, vim-airline set statusline^%{coc#status()}%{get(b:,coc_current_function,)} Mappings for CoCListShow all diagnostics nnoremap silentnowait spacea :C-uCocList diagnosticscrManage extensions nnoremap silentnowait spacee :C-uCocList extensionscrShow commands nnoremap silentnowait spacec :C-uCocList commandscrFind symbol of current document nnoremap silentnowait spaceo :C-uCocList outlinecrSearch workspace symbols nnoremap silentnowait spaces :C-uCocList -I symbolscrDo default action for next item nnoremap silentnowait spacej :C-uCocNextCRDo default action for previous item nnoremap silentnowait spacek :C-uCocPrevCRResume latest coc list nnoremap silentnowait spacep :C-uCocListResumeCR
http://www.huolong8.cn/news/480155/

相关文章:

  • 网站模版参考wordpress做导航插件
  • ftp免费注册网站移动端模板网站建设价格
  • 网站建设怎么进行一级域名申请我想在百度上发布广告怎么发
  • 南阳美容网站建设10个优秀的网页设计欣赏
  • 手机企业网站苏州好的网站公司哪家好
  • 南昌网站建设冲浪者青岛建韩国网站的公司
  • html做电子书网站wordpress无插件自动实现tag关键字内链
  • 怎么做网站加盟信息门户平台
  • 网站界面修改网站建设是要考虑什么东西
  • 网站策划建设方法seo作弊
  • 吕梁seo网站建设wordpress rewrite iis
  • 建立英文网站深圳龙岗区吉华街道邮编
  • 订阅号怎么做免费的视频网站吗网站建站如何做seo
  • 上海门户网站制行业网站网址
  • 重庆巫山网站设计哪家专业咨询公司
  • 网站推广链接不花钱网站推广
  • 怎么在网站添加关键词公司装修合同模板
  • 宝安建设网站公司注册成立公司的基本流程
  • 做网站的那些事wordpress朋友圈图片
  • 不需要网站备案的广告联盟外贸推广建站蓝颜seo牛
  • 成都住房和城乡建设部网站网站代理加盟
  • 电商网站设计公司可找亿企邦石家庄网站制作费用
  • 钦州网站建设公司wordpress 文章转dz
  • 我要下载中国建设网站坪山区住房和建设局网站
  • 如何通过网站开发客户wordpress支持视频播放器插件下载
  • 站长推荐网页设计与制作代码成品
  • 互联网网站制作公司高仿卡地亚手表网站
  • 网站在建设中无法访问网站右击无效是怎么做的
  • 中国建设部官方网站鲁班奖思特奇是外包公司吗
  • 国外专门做童装的网站关于网站建设的建议征集